You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the get_current_user method in the Fabrikant class returns None if it doesn't find an entry in the Fabrikant table corresponding to the current Datajoint username. This behavior of returning None can lead to non-helpful error messages in certain situations. For example trying to insert a dataset into the Dataset table without a matching entry being present in the Fabrikant table raises this error:
MissingAttributeError: Field 'dataset_fabrikant' doesn't have a default value
I propose to raise a more descriptive error in the get_current_user method if there is no matching entry found.
The text was updated successfully, but these errors were encountered:
Right now the
get_current_user
method in theFabrikant
class returnsNone
if it doesn't find an entry in theFabrikant
table corresponding to the current Datajoint username. This behavior of returningNone
can lead to non-helpful error messages in certain situations. For example trying to insert a dataset into theDataset
table without a matching entry being present in theFabrikant
table raises this error:MissingAttributeError: Field 'dataset_fabrikant' doesn't have a default value
I propose to raise a more descriptive error in the
get_current_user
method if there is no matching entry found.The text was updated successfully, but these errors were encountered: