Skip to content

Commit

Permalink
refactor(generic,apis_metainfo): move duplicate signals to generic app
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Dec 11, 2024
1 parent fd689b2 commit 84884e8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apis_core/apis_metainfo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from django.forms import model_to_dict
from model_utils.managers import InheritanceManager

from apis_core.apis_metainfo import signals
from apis_core.generic import signals
from apis_core.generic.abc import GenericModel
from apis_core.utils import rdf
from apis_core.utils import settings as apis_settings
Expand Down
4 changes: 0 additions & 4 deletions apis_core/apis_metainfo/signals.py

This file was deleted.

2 changes: 1 addition & 1 deletion apis_core/apis_relations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from django.db.models.signals import m2m_changed
from model_utils.managers import InheritanceManager

from apis_core.apis_metainfo import signals
from apis_core.apis_metainfo.models import RootObject
from apis_core.generic import signals
from apis_core.generic.abc import GenericModel
from apis_core.history.models import VersionMixin
from apis_core.utils import DateParser
Expand Down
3 changes: 1 addition & 2 deletions apis_core/apis_relations/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
from django.dispatch import receiver

from apis_core.apis_metainfo.models import RootObject
from apis_core.apis_metainfo.signals import post_duplicate
from apis_core.apis_relations.models import TempTriple
from apis_core.generic.signals import post_merge_with
from apis_core.generic.signals import post_duplicate, post_merge_with

logger = logging.getLogger(__name__)

Expand Down
2 changes: 2 additions & 0 deletions apis_core/generic/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

pre_merge_with = ModelSignal(use_caching=True)
post_merge_with = ModelSignal(use_caching=True)
pre_duplicate = ModelSignal(use_caching=True)
post_duplicate = ModelSignal(use_caching=True)
3 changes: 1 addition & 2 deletions apis_core/relations/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from django.contrib.contenttypes.models import ContentType
from django.dispatch import receiver

from apis_core.apis_metainfo.signals import post_duplicate
from apis_core.generic.signals import post_merge_with
from apis_core.generic.signals import post_duplicate, post_merge_with
from apis_core.relations.models import Relation

logger = logging.getLogger(__name__)
Expand Down

0 comments on commit 84884e8

Please sign in to comment.