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 you try to update some element's foreign key providing an invalid value (i.e. not existing in the related table), it's stored anyway in DB and prevent you to do further operations on that element.
Example:
# Valid request
/usr/src/app # python -m my_module config url update 1 --force --client 1
Changed 1 records.
client <Client id=1>
id 1
path 'foo'
# Bad request
/usr/src/app # python -m my_module config url update 1 --force --client -1
[...]
bugloader.models.ClientDoesNotExist: Instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."name" FROM "client" AS t1 WHERE ("t1"."id" = ?)
PARAMS: [-1]
From this moment every single operation gives an error, unless you pass the "-f" option to update the field or delete the row.
The text was updated successfully, but these errors were encountered:
MiguelSR
changed the title
Updating ForeignKey with non-existing reference brokes functionality.
Updating ForeignKey with non-existing reference breaks functionality.
Jul 19, 2017
When you try to update some element's foreign key providing an invalid value (i.e. not existing in the related table), it's stored anyway in DB and prevent you to do further operations on that element.
Example:
From this moment every single operation gives an error, unless you pass the "-f" option to update the field or delete the row.
The text was updated successfully, but these errors were encountered: