Closed gsrohde closed 7 years ago
I like 2 ; automatically assign the user doing the updating as the user if (and only if) the row being updated has null user_id.
Does this happen to the traits table as well?
No, it doesn't happen with the traits table. Updating a trait with null user_id
leaves it null (option 1).
When yields are created via the BETYdb Rails app, the
user_id
is automatically set to the logged-in user. But there are existing rows in the yields table with nulluser_id
. If one tries to update such a row via the Rails app, the app won't allow it and will complain that a user hasn't been assigned.Options for fixing: (1) allow
user_id
to remain null if the row is being updated; (2) automatically assign the user doing the updating as the user _if (and only if) the row being updated has nulluser_id
_.