diff --git a/data/database.py b/data/database.py index d4b9efa5b..fea50c69a 100644 --- a/data/database.py +++ b/data/database.py @@ -694,11 +694,9 @@ class LogEntryKind(BaseModel): name = CharField(index=True, unique=True) -_LogEntryAccountProxy = Proxy() - class LogEntry(BaseModel): kind = ForeignKeyField(LogEntryKind, index=True) - account = ForeignKeyField(_LogEntryAccountProxy, index=True, related_name='account') + account = QuayUserField(index=True, related_name='account') performer = QuayUserField(allows_robots=True, index=True, null=True, related_name='performer', robot_null_delete=True) repository = ForeignKeyField(Repository, index=True, null=True) @@ -717,8 +715,6 @@ class LogEntry(BaseModel): (('repository', 'datetime', 'kind'), False), ) -_LogEntryAccountProxy.initialize(User) - class RepositoryActionCount(BaseModel): repository = ForeignKeyField(Repository, index=True)