mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-19 12:29:34 +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(
|
Permission.objects.create(
|
||||||
name=_("Permission for queue: ") + self.title,
|
name=_("Permission for queue: ") + self.title,
|
||||||
content_type=ContentType.objects.get(model="queue"),
|
content_type=ContentType.objects.get_for_model(self.__class__),
|
||||||
codename=basename,
|
codename=basename,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user