Skip to content

Commit

Permalink
Revert "We can now add OneToOneField with a foreignkey. For that, the…
Browse files Browse the repository at this point in the history
… foreignkey should"

This reverts commit 76f9d5e.
  • Loading branch information
ccollins committed Aug 9, 2011
1 parent 79eebd1 commit 56de200
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions milkman/dairy.py
Expand Up @@ -117,14 +117,7 @@ def set_local_fields(self, target, the_milkman, exclude):
pass
else:
v = self.generator_for(the_milkman.registry, field).next()
try:
if not getattr(target, field.name):
setattr(target, field.name, v)
except field.rel.to.DoesNotExist:
raise field.rel.to.DoesNotExist( "Please deliver a %s and add "
"%s_id=your_%s.id when delivering a %s" % ( field.name,
field.name, field.name, type(target).__name__),
)
setattr(target, field.name, v)

def set_m2m_fields(self, target, the_milkman, exclude):
for field in self.fields_to_generate(
Expand Down

0 comments on commit 56de200

Please sign in to comment.