Skip to content
This repository
Browse code

Fix for partially populated relationships in follow_joins

  • Loading branch information...
commit c656df2d2dc0d810f40575653c8e118b7352da41 1 parent 5b93c6f
Charles Leifer authored October 14, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  peewee.py
2  peewee.py
@@ -1027,7 +1027,7 @@ def follow_joins(self, joins, collected_models, current):
1027 1027
                 if not fk_field:
1028 1028
                     continue
1029 1029
 
1030  
-                if not joined_inst.get_id():
  1030
+                if not joined_inst.get_id() and fk_field.name in inst._data:
1031 1031
                     rel_inst_id = inst._data[fk_field.name]
1032 1032
                     joined_inst.set_id(rel_inst_id)
1033 1033
 

0 notes on commit c656df2

Please sign in to comment.
Something went wrong with that request. Please try again.