-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
49 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,17 @@ | ||
from invenio_requests.customizations import RequestType | ||
from oarepo_runtime.i18n import lazy_gettext as _ | ||
from ..actions.doi import CreateDoiAction, EditDoiAction | ||
from ..actions.doi import CreateDoiAction, ValidateDataForDoiAction | ||
from oarepo_requests.types.ref_types import ModelRefTypes | ||
from oarepo_requests.types.generic import NonDuplicableOARepoRequestType | ||
|
||
class CreateDoiRequestType(NonDuplicableOARepoRequestType): | ||
type_id = "create_doi" | ||
name = _("create_doi") | ||
class CreateDoiRequestType(RequestType): | ||
type_id = "assign_doi" | ||
name = _("assign_doi") | ||
|
||
available_actions = { | ||
**RequestType.available_actions, | ||
"accept": CreateDoiAction, | ||
"submit": ValidateDataForDoiAction, | ||
} | ||
|
||
receiver_can_be_none = True | ||
allowed_topic_ref_types = ModelRefTypes(published=True, draft=True) | ||
|
||
class EditDoiRequestType(NonDuplicableOARepoRequestType): | ||
type_id = "edit_doi" | ||
name = _("edit_doi") | ||
|
||
available_actions = { | ||
**RequestType.available_actions, | ||
"accept": EditDoiAction, | ||
} | ||
|
||
receiver_can_be_none = True | ||
allowed_topic_ref_types = ModelRefTypes(published=True, draft=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = oarepo-doi | ||
version = 1.0.2 | ||
version = 1.0.3 | ||
description = | ||
authors = Alzbeta Pokorna <[email protected]> | ||
readme = README.md | ||
|
@@ -35,4 +35,3 @@ invenio_base.api_apps = | |
oarepodoi = oarepo_doi.ext:OARepoDOI | ||
invenio_requests.types = | ||
create-doi-request = oarepo_doi.types.doi:CreateDoiRequestType | ||
edit-doi-request = oarepo_doi.types.doi:EditDoiRequestType |