Closed avenmia closed 11 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
hierr | ✅ Ready (Inspect) | Visit Preview | Aug 12, 2023 10:20pm |
Prisma wouldn't let me use findUnique so I used findFirst. I don't think this should cause issues, but let me know if it does.
I can't test this locally (travelling right now) but I think this is because the query predicate is not based on the primary key of the user survey answers table; it's based on two columns which might have duplicates (for example, the table definition probably doesn't disallow multiple rows with the same (user xid, question id) values). I'm not familiar with this table, but as long as our code doesn't insert multiple rows with the same (user xid, question id) tuple, then we're all good.
Have you tested this locally and confirmed it to work? I can't run this locally so I can't confirm it myself, but my instinct tells me that you may need to chain the new promises together with the old ones rather than trying to run them in parallel.
If it all works locally for you, let me know and I'll approve!
@dinoboy197 It did work locally, but if the promises are not chained could they be inserted in a different order?
Scott requested two additional export columns based on the user's answer for the workshop question in the demographic survey. The first column is county and the second is region. The value is stored in the database as a hyphenated value. This PR should add the two columns in the export and the values should be based on the user's answer.
Prisma wouldn't let me use findUnique so I used findFirst. I don't think this should cause issues, but let me know if it does. If a user retakes the demographic survey, it should erase the original answers and replace them so each userId and question should have a unique value.