fix: 修复应用无法保存 (#856)

This commit is contained in:
shaohuzhang1 2024-07-24 16:03:44 +08:00 committed by GitHub
parent e2867995af
commit 26536112ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,9 +57,9 @@ class Model(AppModelMixin):
default=PermissionType.PRIVATE)
def is_permission(self, user_id):
if self.permission_type == PermissionType.PRIVATE and str(user_id) == str(self.user_id):
return False
return True
if self.permission_type == PermissionType.PUBLIC or str(user_id) == str(self.user_id):
return True
return False
class Meta:
db_table = "model"