make applications name-unique

This commit is contained in:
AlanCoding
2018-07-16 14:58:26 -04:00
parent 62967b2806
commit 885ea2c5e1
3 changed files with 7 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ class OAuth2Application(AbstractApplication):
class Meta:
app_label = 'main'
verbose_name = _('application')
unique_together = (("name", "organization"),)
CLIENT_CONFIDENTIAL = "confidential"
CLIENT_PUBLIC = "public"