Skip to content

Commit

Permalink
on event draft option
Browse files Browse the repository at this point in the history
  • Loading branch information
Alzpeta committed Oct 2, 2024
1 parent 1f8730c commit e37ed53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions oarepo_doi/services/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def create(self, identity, data=None, record=None, **kwargs):
create_doi(self, record, data, None)

def update_draft(self, identity, data=None, record=None, **kwargs):
if self.mode == "AUTOMATIC_DRAFT" or self.mode == "ON_EVENT":
if self.mode == "AUTOMATIC_DRAFT" or self.mode == "ON_EVENT_DRAFT":
slug = community_slug_for_credentials(
record.parent["communities"].get("default", None)
)
Expand All @@ -56,6 +56,7 @@ def update(self, identity, data=None, record=None, **kwargs):
self.mode == "AUTOMATIC_DRAFT"
or self.mode == "AUTOMATIC"
or self.mode == "ON_EVENT"
or self.mode == "ON_EVENT_DRAFT"
):
slug = community_slug_for_credentials(
record.parent["communities"].get("default", None)
Expand All @@ -70,7 +71,7 @@ def publish(self, identity, data=None, record=None, **kwargs):
)
self.credentials(slug)
create_doi(self, record, record, "publish")
if self.mode == "AUTOMATIC_DRAFT":
if self.mode == "AUTOMATIC_DRAFT" or self.mode == "ON_EVENT_DRAFT":
slug = community_slug_for_credentials(
record.parent["communities"].get("default", None)
)
Expand Down

0 comments on commit e37ed53

Please sign in to comment.