mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 05:07:50 +02:00
Fix a bug related to consist
This commit is contained in:
@@ -105,7 +105,8 @@ class ConsistItem(models.Model):
|
||||
# it is hosted here to avoid circular imports
|
||||
@receiver(models.signals.post_save, sender=RollingStock)
|
||||
def post_save_unpublish_consist(sender, instance, *args, **kwargs):
|
||||
consists = Consist.objects.filter(consist_item__rolling_stock=instance)
|
||||
for consist in consists:
|
||||
consist.published = False
|
||||
consist.save()
|
||||
if not instance.published:
|
||||
consists = Consist.objects.filter(consist_item__rolling_stock=instance)
|
||||
for consist in consists:
|
||||
consist.published = False
|
||||
consist.save()
|
||||
|
@@ -1,4 +1,4 @@
|
||||
from ram.utils import git_suffix
|
||||
|
||||
__version__ = "0.16.5"
|
||||
__version__ = "0.16.6"
|
||||
__version__ += git_suffix(__file__)
|
||||
|
Reference in New Issue
Block a user