We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ea0df5 commit ee0641cCopy full SHA for ee0641c
sde_collections/models/pattern.py
@@ -196,7 +196,15 @@ def apply(self) -> None:
196
TitlePatternCandidateURL.objects.bulk_create(pattern_url_associations, ignore_conflicts=True)
197
198
def unapply(self) -> None:
199
- self.candidate_urls.update(generated_title="")
+ candidate_urls = self.candidate_urls.all()
200
+ for candidate_url in candidate_urls:
201
+ candidate_url.generated_title = ""
202
+ candidate_url.save()
203
+ self.candidate_urls.clear()
204
+
205
+ def delete(self, *args, **kwargs):
206
+ self.unapply()
207
+ super().delete(*args, **kwargs)
208
209
class Meta:
210
"""Meta definition for TitlePattern."""
0 commit comments