mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-25 16:18:51 +01:00
Make helpdesk work in apps with their own queue models
To avoid returning multiple content types when creating custom permissions, use ContentType.objects.get_for_model to lookup the content type for helpdesk.models.queue.
This commit is contained in:
parent
aa2265ccb1
commit
2f66c50320
@ -320,7 +320,7 @@ class Queue(models.Model):
|
||||
|
||||
Permission.objects.create(
|
||||
name=_("Permission for queue: ") + self.title,
|
||||
content_type=ContentType.objects.get(model="queue"),
|
||||
content_type=ContentType.objects.get_for_model(self.__class__),
|
||||
codename=basename,
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user