mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Made it work for users that already exist in database
This commit is contained in:
@@ -16,8 +16,8 @@ from decimal import Decimal
|
||||
class Profile(AbstractUser):
|
||||
initials = models.CharField(max_length=5, unique=True, null=True, blank=False)
|
||||
phone = models.CharField(max_length=13, null=True, blank=True)
|
||||
api_key = models.CharField(max_length=40,blank=False,editable=True,default=lambda: make_api_key())
|
||||
|
||||
api_key = models.CharField(max_length=40,blank=True,editable=False, null=True)
|
||||
|
||||
@classmethod
|
||||
def make_api_key(cls):
|
||||
size=20
|
||||
|
||||
Reference in New Issue
Block a user