wbwriter 1.50.10__py2.py3-none-any.whl → 1.50.12__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wbwriter might be problematic. Click here for more details.

@@ -9,6 +9,7 @@ from celery import shared_task
9
9
  from django import template
10
10
  from django.contrib.auth import get_user_model
11
11
  from django.contrib.contenttypes.fields import GenericRelation
12
+ from django.contrib.contenttypes.models import ContentType
12
13
  from django.core.files.base import ContentFile
13
14
  from django.db import models
14
15
  from django.db.models import Count, Max, OuterRef, Subquery
@@ -806,7 +807,9 @@ class Article(CloneMixin, TagModelMixin, PublishableMixin, WBModel):
806
807
  )
807
808
  def unpublish(self, by=None):
808
809
  """Move the article back to the approved state."""
809
- pass
810
+
811
+ # we delete existing publication in case the user unpublish it
812
+ Publication.objects.filter(object_id=self.id, content_type=ContentType.objects.get_for_model(self)).delete()
810
813
 
811
814
  # @transition(
812
815
  # status,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbwriter
3
- Version: 1.50.10
3
+ Version: 1.50.12
4
4
  Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
5
5
  Requires-Dist: reportlab==3.*
6
6
  Requires-Dist: wbcore
@@ -19,7 +19,7 @@ wbwriter/migrations/0011_auto_20240103_0953.py,sha256=UnaHFJM7DVOSEfS0wm8rWEh9H2
19
19
  wbwriter/migrations/0012_i18n.py,sha256=24cClx1sWYh-VEo-IApTiSr5nNvV1CtINiaWRHFztMA,724
20
20
  wbwriter/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  wbwriter/models/__init__.py,sha256=opUUL36nRzxJypQNupPM8NxUj-u4uuB11IDn5XSkjVE,248
22
- wbwriter/models/article.py,sha256=wve5_vrEIZMJOmd93TZ6RYNJrAlNgWCSJiOvLNNJMec,45252
22
+ wbwriter/models/article.py,sha256=l5iSkD6uHTlYP94DyMlKnMABjZQZSNoR7-KelC6GH4c,45487
23
23
  wbwriter/models/article_type.py,sha256=hofB200Y11LFanpICNgWYDa5-Qg-K4X2fXv6qccBP_0,1999
24
24
  wbwriter/models/block.py,sha256=tn2sklo7s401Y0Ww5M09Y9Wv-yivEvAR1eM5raG7gtc,835
25
25
  wbwriter/models/block_parameter.py,sha256=bHBp9bo5EEiZKTzhYfBwkidcS6kZVy81vtcAlx7xzck,524
@@ -71,6 +71,6 @@ wbwriter/viewsets/endpoints/meta_information.py,sha256=m7rVbfTNjsQNibmqtAG4DvXSJ
71
71
  wbwriter/viewsets/titles/__init__.py,sha256=INLTvGeBi5Xro7i3FlJ2fesh-TjKbxRBlfsAyeg3h7k,131
72
72
  wbwriter/viewsets/titles/publication_title_config.py,sha256=-39C_Enz8J1o-DWgRz89VFMV0r4MReKx-r-Tpf9MlVM,807
73
73
  wbwriter/viewsets/titles/reviewer_article_title_config.py,sha256=YzRjuUwbe6vBwWhYLrCe6woGCpQ9c7AwkujKqPh5mLw,183
74
- wbwriter-1.50.10.dist-info/METADATA,sha256=wm2awX-IYcTsXUyvqDNWqZFxoy7jcbX5xdMGJ2uUcDE,170
75
- wbwriter-1.50.10.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
76
- wbwriter-1.50.10.dist-info/RECORD,,
74
+ wbwriter-1.50.12.dist-info/METADATA,sha256=4Odcw5xUf2klMDKgHyzFKDQdfUfOf8oSp8VIslQ4-YM,170
75
+ wbwriter-1.50.12.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
76
+ wbwriter-1.50.12.dist-info/RECORD,,