Commit 924affd9 authored by ibuler's avatar ibuler

[Update] 更新移动的model

parent ad6d233c
......@@ -10,8 +10,8 @@ class Migration(migrations.Migration):
]
database_operations = [
migrations.AlterModelTable(name='accesskey', table='autentication_accesskey'),
migrations.AlterModelTable(name='privatetoken', table='autentication_privatetoken'),
migrations.AlterModelTable(name='accesskey', table='authentication_accesskey'),
migrations.AlterModelTable(name='privatetoken', table='authentication_privatetoken'),
migrations.AlterModelTable(name='loginlog', table='audits_userloginlog'),
]
......
......@@ -321,8 +321,7 @@ class User(AbstractUser):
pass
def create_access_key(self):
from . import AccessKey
access_key = AccessKey.objects.create(user=self)
access_key = self.access_keys.create()
return access_key
@property
......@@ -334,11 +333,6 @@ class User(AbstractUser):
return True
return False
def check_public_key(self, public_key):
if self.ssh_public_key == public_key:
return True
return False
def avatar_url(self):
admin_default = settings.STATIC_URL + "img/avatar/admin.png"
user_default = settings.STATIC_URL + "img/avatar/user.png"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment