Allow only one StashOwner instance per User
authorMikko Värri <vmj@linuxbox.fi>
Tue, 2 Feb 2010 00:41:51 +0000 (02:41 +0200)
committerMikko Värri <vmj@linuxbox.fi>
Tue, 2 Feb 2010 00:41:51 +0000 (02:41 +0200)
recycloid_models/models.py

index d65abdb..ea0cd7a 100644 (file)
@@ -58,7 +58,7 @@ class StashOwner(IdentifiedModel):
     One stash server may have zero or more stash owners.
     """
 
-    user = models.ForeignKey(User)
+    user = models.ForeignKey(User, unique=True)
 
     server = models.ForeignKey(StashServer)