Commit 924affd9 authored by ibuler's avatar ibuler

[Update] 更新移动的model

parent ad6d233c
...@@ -10,8 +10,8 @@ class Migration(migrations.Migration): ...@@ -10,8 +10,8 @@ class Migration(migrations.Migration):
] ]
database_operations = [ database_operations = [
migrations.AlterModelTable(name='accesskey', table='autentication_accesskey'), migrations.AlterModelTable(name='accesskey', table='authentication_accesskey'),
migrations.AlterModelTable(name='privatetoken', table='autentication_privatetoken'), migrations.AlterModelTable(name='privatetoken', table='authentication_privatetoken'),
migrations.AlterModelTable(name='loginlog', table='audits_userloginlog'), migrations.AlterModelTable(name='loginlog', table='audits_userloginlog'),
] ]
......
...@@ -321,8 +321,7 @@ class User(AbstractUser): ...@@ -321,8 +321,7 @@ class User(AbstractUser):
pass pass
def create_access_key(self): def create_access_key(self):
from . import AccessKey access_key = self.access_keys.create()
access_key = AccessKey.objects.create(user=self)
return access_key return access_key
@property @property
...@@ -334,11 +333,6 @@ class User(AbstractUser): ...@@ -334,11 +333,6 @@ class User(AbstractUser):
return True return True
return False return False
def check_public_key(self, public_key):
if self.ssh_public_key == public_key:
return True
return False
def avatar_url(self): def avatar_url(self):
admin_default = settings.STATIC_URL + "img/avatar/admin.png" admin_default = settings.STATIC_URL + "img/avatar/admin.png"
user_default = settings.STATIC_URL + "img/avatar/user.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