Try and prevent some exceptions seen on app
Seen on vdb dashboard
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/py4web/core.py", line 945, in wrapper
ret = func(*func_args, **func_kwargs)
File "/usr/local/lib/python3.8/dist-packages/py4web/core.py", line 930, in wrapper
raise context["exception"]
File "/usr/local/lib/python3.8/dist-packages/py4web/core.py", line 909, in wrapper
context["output"] = func(*args, **kwargs)
File "/usr/share/vidjil/server/py4web/apps/vidjil/modules/vidjil_utils.py", line 73, in wrapper
result = func(*args, **kwargs)
File "/usr/share/vidjil/server/py4web/apps/vidjil/controllers/sample_set.py", line 79, in index
sample_set_id = sample_set.id
AttributeError: 'NoneType' object has no attribute 'id'
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/py4web/core.py", line 945, in wrapper
ret = func(*func_args, **func_kwargs)
File "/usr/local/lib/python3.8/dist-packages/py4web/core.py", line 930, in wrapper
raise context["exception"]
File "/usr/local/lib/python3.8/dist-packages/py4web/core.py", line 909, in wrapper
context["output"] = func(*args, **kwargs)
File "/usr/share/vidjil/server/py4web/apps/vidjil/controllers/auth.py", line 87, in logout
user_id = auth.session["user"]["id"]
File "/usr/local/lib/python3.8/dist-packages/py4web/core.py", line 709, in __getitem__
return self.get_data()[key]
KeyError: 'user'
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/py4web/core.py", line 945, in wrapper
ret = func(*func_args, **func_kwargs)
File "/usr/local/lib/python3.8/dist-packages/py4web/core.py", line 930, in wrapper
raise context["exception"]
File "/usr/local/lib/python3.8/dist-packages/py4web/core.py", line 909, in wrapper
context["output"] = func(*args, **kwargs)
File "/usr/share/vidjil/server/py4web/apps/vidjil/modules/vidjil_utils.py", line 73, in wrapper
result = func(*args, **kwargs)
File "/usr/share/vidjil/server/py4web/apps/vidjil/controllers/sample_set.py", line 410, in submit
db[set_type][sample_set.id] = p
File "/usr/local/lib/python3.8/dist-packages/pydal/objects.py", line 744, in __setitem__
raise SyntaxError("No such record: %s" % key)
SyntaxError: No such record: 567