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
I have a foreign key field:
user = Column(Integer(), ForeignKey('clean_controller.id'))
When I try to make a PATCH/PUT request with the request body
{"user": 11}
I get HTTP/1.0 422 UNPROCESSABLE ENTITY
There is a clean_controller table and there is a row with id 11 in it.
class CleanPoint(CommonColumns): tablename = 'clean_point'
id = Column(Integer(), primary_key=True, autoincrement=True)
....
What is the correct way to update it?
The text was updated successfully, but these errors were encountered:
alprotasov
changed the title
Can't update foreign key value
Can't update a foreign key value
Jun 27, 2018
Hello!
I have a foreign key field:
user = Column(Integer(), ForeignKey('clean_controller.id'))
When I try to make a PATCH/PUT request with the request body
{"user": 11}
I get HTTP/1.0 422 UNPROCESSABLE ENTITY
There is a clean_controller table and there is a row with id 11 in it.
class CleanPoint(CommonColumns):
tablename = 'clean_point'
id = Column(Integer(), primary_key=True, autoincrement=True)
....
What is the correct way to update it?
The text was updated successfully, but these errors were encountered: