change response of permissions apis

This commit is contained in:
xoliqberdiyev
2026-04-28 16:04:59 +05:00
parent d7ea1acba6
commit d1340cdd52
5 changed files with 38 additions and 11 deletions

View File

@@ -33,7 +33,7 @@ class PermissionToTab(AbstractBaseModel):
class Permission(AbstractBaseModel):
name = models.CharField(max_length=200)
code = models.CharField(max_length=100, unique=True)
permission_tab = models.ManyToManyField(PermissionToTab, related_name='permissions')
permission_tabs = models.ManyToManyField(PermissionToTab, related_name='permissions')
def __str__(self):
return f'{self.name} - {self.code}'