Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask\app.py", line 2088, in __call__
return self.wsgi_app(environ, start_response)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask\app.py", line 2073, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask\app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask\app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask\app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask\app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_restless\views\base.py", line 408, in new_func
data, status_code, headers = func(*args, **kw)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_restless\views\base.py", line 400, in new_func
return func(*args, **kw)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_restless\views\base.py", line 354, in new_func
return func(*args, **kw)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_restless\views\base.py", line 240, in new_func
return func(*args, **kw)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask\views.py", line 83, in view
return self.dispatch_request(*args, **kwargs)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_restless\views\base.py", line 1304, in dispatch_request
return super().dispatch_request(*args, **kwargs)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask\views.py", line 157, in dispatch_request
return meth(*args, **kwargs)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_restless\views\base.py", line 443, in wrapped
return func(*args, **kw)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_restless\views\resources.py", line 299, in post
instance = self.deserializer.deserialize(data)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_restless\serialization.py", line 588, in deserialize
links[link_name] = deserializer.deserialize(linkage)
File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\pce-testsheets-g8TS-oaq-py3.8\Lib\site-packages\flask_restless\serialization.py", line 660, in deserialize
if 'id' not in data:
TypeError: argument of type 'NoneType' is not iterable
performing a
POST
with a null relationship causes a server errorWhat I expect to happen
I expect posting a
null
relationship to set that relationship on the model toNone
What happened instead
Server responded with a 500 error because of an uncaught exception.
Work around
Remove
comment
relationship fromrelationships
beforePOST
Failing
POST
dataException traceback