outpost: fix outpost update signal only being sent to outposts connected to the same passbook instance

This commit is contained in:
Jens Langhammer
2020-09-13 14:29:40 +02:00
parent 0161205c82
commit 7a4e8af1ae
3 changed files with 40 additions and 17 deletions

View File

@ -9,6 +9,7 @@ from dacite import from_dict
from django.contrib.postgres.fields import ArrayField
from django.core.cache import cache
from django.db import models
from django.db.models.base import Model
from django.utils.translation import gettext_lazy as _
from guardian.shortcuts import assign_perm
@ -30,13 +31,17 @@ class OutpostConfig:
)
class OutpostModel:
class OutpostModel(Model):
"""Base model for providers that need more objects than just themselves"""
def get_required_objects(self) -> Iterable[models.Model]:
"""Return a list of all required objects"""
return [self]
class Meta:
abstract = True
class OutpostType(models.TextChoices):
"""Outpost types, currently only the reverse proxy is available"""