Skip to content

Commit

Permalink
chore: drop support for Weblate older than 5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jan 21, 2025
1 parent c7cd9c3 commit c904646
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ django-appconf>=1.0.0,<1.1
fedora-messaging==3.7.0
setuptools>=65.5.1
twisted>=23.8.0
Weblate>=5.6
Weblate>=5.9
17 changes: 6 additions & 11 deletions weblate_fedora_messaging/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from django.dispatch import receiver
from weblate.trans.models import Change
from weblate.utils.decorators import disable_for_loaddata
from weblate.trans.signals import change_bulk_create

from .tasks import fedora_messaging_change

Expand All @@ -32,17 +33,11 @@ def fedora_notify_change(sender, instance, **kwargs):
fedora_messaging_change.delay(instance.pk)


try:
from weblate.trans.signals import change_bulk_create
except ImportError:
pass
else:

@receiver(change_bulk_create)
@disable_for_loaddata
def fedora_notify_change(sender, instances, **kwargs):
for instance in instances:
fedora_messaging_change.delay(instance.pk)
@receiver(change_bulk_create)
@disable_for_loaddata
def fedora_bulk_notify_change(sender, instances, **kwargs):
for instance in instances:
fedora_messaging_change.delay(instance.pk)


class FedoraConf(AppConf):
Expand Down

0 comments on commit c904646

Please sign in to comment.