Skip to content

Commit

Permalink
Adding a check in the models.py Meta class to check for mysql db, and if
Browse files Browse the repository at this point in the history
so, to not use a unique_together constraint
  • Loading branch information
coleifer committed Aug 21, 2010
1 parent 0d89b45 commit 42262c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oembed/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class Meta:
ordering = ('-date_added',)
verbose_name = 'stored OEmbed'
verbose_name_plural = 'stored OEmbeds'
unique_together = ('match', 'maxwidth', 'maxheight')
if 'mysql' not in settings.DATABASES['default']['ENGINE']:
unique_together = ('match', 'maxwidth', 'maxheight')

def __unicode__(self):
return self.match
Expand Down

0 comments on commit 42262c1

Please sign in to comment.