mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2026-08-20 18:22:49 +01:00
bugfix: read env variables of datacite
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
"""invenio module for TUGRAZ theme."""
|
"""invenio module for TUGRAZ theme."""
|
||||||
|
|
||||||
import binascii
|
import binascii
|
||||||
|
from os import environ
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from elasticsearch_dsl.utils import AttrDict
|
from elasticsearch_dsl.utils import AttrDict
|
||||||
@@ -82,10 +83,10 @@ def comingsoon():
|
|||||||
|
|
||||||
def get_datacite_details():
|
def get_datacite_details():
|
||||||
"""Application credentials for DOI."""
|
"""Application credentials for DOI."""
|
||||||
url = current_app.config.get("INVENIO_DATACITE_URL") or ""
|
url = environ.get('INVENIO_DATACITE_URL') or ""
|
||||||
username = current_app.config.get("INVENIO_DATACITE_UNAME") or ""
|
username = environ.get('INVENIO_DATACITE_UNAME') or ""
|
||||||
password = current_app.config.get("INVENIO_DATACITE_PASS") or ""
|
password = environ.get('INVENIO_DATACITE_PASS') or ""
|
||||||
prefix = current_app.config.get("INVENIO_DATACITE_PREFIX") or ""
|
prefix = environ.get('INVENIO_DATACITE_PREFIX') or ""
|
||||||
|
|
||||||
password_iv, encrypted_password = Cryptor.encrypt(password, Cryptor.KEY)
|
password_iv, encrypted_password = Cryptor.encrypt(password, Cryptor.KEY)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user