Error when sharing dataset with a newly created user that hasn't logged in yet
When you create a user from the admin panel then you share a dataset with that user, the dataset will be corrupted, (and by corrupted I mean that you can't do the normal operations on the dataset, you can't even see who are the members of the dataset) UNTIL the newly created user logs in, once he logs in, the dataset becomes normal again; I will mention the steps below:
-
Create a dataset (if you don't have an existing one already).
-
Create a user from the
admin paneland do not log in with that user for now. -
Share the dataset with the new user.
-
Open the dataset, it will give you error, you can't even navigate between the dataset tabs!

When you click on any of these tabs, it actually gives this error in the console.

Once you log in with that new user (log in from anywhere), the database becomes normal again.
Note: this has no difference if the newly created user is an admin not.
seems like new users has not "last_seen" data, that lead to error...
I'll create pull/request after I have time to check code is correct. 😭😭😭
You can try to edit backend/database/users.py,Line 20
from
last_seen = DateTimeField()
to
last_seen = DateTimeField(defualt=datetime.datetime.now())
https://github.com/jsbroks/coco-annotator/blob/7c9992ce623b891c5dc208cd24451e51f0e76151/backend/database/users.py#L20