Permalink
Browse files

If no value posted for onetoone field, we return None to delete the v…

…alue from the DB
  • Loading branch information...
LeResKP committed Jan 3, 2013
1 parent 8d75aa8 commit 538e48eb94584cd97961a12b1104e252ef7fd418
Showing with 3 additions and 1 deletion.
  1. +3 −1 tw2/sqla/widgets.py
View
@@ -122,7 +122,9 @@ def has_value(dic):
elif self.required_children:
if not has_value(value):
# No problem, no value posted.
- return value
+ # We return None to make sure we will delete the onetoone field
+ # or not create it
+ return None
error_dict = {}
for c in self.required_children:

0 comments on commit 538e48e

Please sign in to comment.