X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f4921ca797953ddab6b35786864b2dd523190503..dae8c833746bf716c05aaccba59a5fc049918163:/apps/apiclient/models.py?ds=inline diff --git a/apps/apiclient/models.py b/apps/apiclient/models.py index d3c8f620..9cce9a8e 100644 --- a/apps/apiclient/models.py +++ b/apps/apiclient/models.py @@ -7,13 +7,14 @@ class OAuthConnection(models.Model): access = models.BooleanField(default=False) token = models.CharField(max_length=64, null=True, blank=True) token_secret = models.CharField(max_length=64, null=True, blank=True) + beta = models.BooleanField(default=False) @classmethod - def get(cls, user): + def get(cls, user, beta=False): try: - return cls.objects.get(user=user) + return cls.objects.get(user=user, beta=beta) except cls.DoesNotExist: - o = cls(user=user) + o = cls(user=user, beta=beta) o.save() return o