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
When trying to create a feature without a session and default user (@me) application should return HTTP:400 Bad Request. Instead it tries to assign AnonymousUser to the feature and throws a ValueError.
Traceback (most recent call last):
File "/home/msjohans/virtualenvs/geonition_test/src/geojson-rest/geojson_rest/tests.py", line 174, in test_unauthorized_post
content_type = 'application/json')
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/test/client.py", line 449, in post
response = super(Client, self).post(path, data=data, content_type=content_type, **extra)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/test/client.py", line 262, in post
return self.request(**r)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/views/generic/base.py", line 48, in view
return self.dispatch(request, _args, *_kwargs)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in dispatch
return handler(request, _args, *_kwargs)
File "/home/msjohans/virtualenvs/geonition_test/src/geojson-rest/geojson_rest/views.py", line 97, in post
group = group)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/db/models/base.py", line 355, in init
setattr(self, field.name, rel_obj)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/db/models/fields/related.py", line 366, in set
self.field.name, self.field.rel.to._meta.object_name))
ValueError: Cannot assign "<django.utils.functional.SimpleLazyObject object at 0xa1dfa6c>": "Feature.user" must be a "User" instance.
The text was updated successfully, but these errors were encountered:
When trying to create a feature without a session and default user (@me) application should return HTTP:400 Bad Request. Instead it tries to assign AnonymousUser to the feature and throws a ValueError.
Traceback (most recent call last):
File "/home/msjohans/virtualenvs/geonition_test/src/geojson-rest/geojson_rest/tests.py", line 174, in test_unauthorized_post
content_type = 'application/json')
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/test/client.py", line 449, in post
response = super(Client, self).post(path, data=data, content_type=content_type, **extra)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/test/client.py", line 262, in post
return self.request(**r)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/views/generic/base.py", line 48, in view
return self.dispatch(request, _args, *_kwargs)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in dispatch
return handler(request, _args, *_kwargs)
File "/home/msjohans/virtualenvs/geonition_test/src/geojson-rest/geojson_rest/views.py", line 97, in post
group = group)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/db/models/base.py", line 355, in init
setattr(self, field.name, rel_obj)
File "/home/msjohans/virtualenvs/geonition_test/local/lib/python2.7/site-packages/django/db/models/fields/related.py", line 366, in set
self.field.name, self.field.rel.to._meta.object_name))
ValueError: Cannot assign "<django.utils.functional.SimpleLazyObject object at 0xa1dfa6c>": "Feature.user" must be a "User" instance.
The text was updated successfully, but these errors were encountered: