oarepo-runtime 1.10.0__py3-none-any.whl → 1.10.1__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.
@@ -20,7 +20,15 @@ def get_user_and_identity(user_id=None, username=None, email=None):
20
20
 
21
21
  identity = Identity(user.id)
22
22
  identity.provides.add(UserNeed(user.id))
23
- api_app = current_app.wsgi_app.mounts["/api"]
23
+ if (
24
+ hasattr(current_app.wsgi_app, "mounts")
25
+ and "/api" in current_app.wsgi_app.mounts
26
+ ):
27
+ # called from UI
28
+ api_app = current_app.wsgi_app.mounts["/api"]
29
+ else:
30
+ # called from API
31
+ api_app = current_app
24
32
  with api_app.app_context():
25
33
  with current_app.test_request_context("/api"):
26
34
  identity_loaded.send(api_app, identity=identity)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oarepo-runtime
3
- Version: 1.10.0
3
+ Version: 1.10.1
4
4
  Summary: A set of runtime extensions of Invenio repository
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -148,16 +148,16 @@ oarepo_runtime/translations/en/LC_MESSAGES/messages.mo,sha256=tq5pTCpH7cuzdwrQlp
148
148
  oarepo_runtime/translations/en/LC_MESSAGES/messages.po,sha256=oWFA5kjT-sBNoZ3UIzYS03GQOvri5VqL9NcYnQnYsyQ,2562
149
149
  oarepo_runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
150
150
  oarepo_runtime/utils/functools.py,sha256=gKS9YZtlIYcDvdNA9cmYO00yjiXBYV1jg8VpcRUyQyg,1324
151
- oarepo_runtime/utils/identity_utils.py,sha256=88EVuhKPywR-ExG8SkE2hEkMqnnoe2AouoQ4xl6KApY,974
151
+ oarepo_runtime/utils/identity_utils.py,sha256=a8nnvkX_Am9iibLa82_iK-3agIl11LTxjiy5qPKBoT4,1183
152
152
  oarepo_runtime/utils/index.py,sha256=ArrUUXB-KowUcUksRKqcFpmqct4bn9alO1zd_kX2tmU,292
153
153
  oarepo_runtime/utils/path.py,sha256=V1NVyk3m12_YLbj7QHYvUpE1wScO78bYsX1LOLeXDkI,3108
154
- oarepo_runtime-1.10.0.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
154
+ oarepo_runtime-1.10.1.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
155
155
  tests/marshmallow_to_json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
156
156
  tests/marshmallow_to_json/test_datacite_ui_schema.py,sha256=82iLj8nW45lZOUewpWbLX3mpSkpa9lxo-vK-Qtv_1bU,48552
157
157
  tests/marshmallow_to_json/test_simple_schema.py,sha256=izZN9p0v6kovtSZ6AdxBYmK_c6ZOti2_z_wPT_zXIr0,1500
158
158
  tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
159
- oarepo_runtime-1.10.0.dist-info/METADATA,sha256=72OmTjxiORWXpCk0zxKHheyRAu6lRFIPrUqDyxEWT-E,4789
160
- oarepo_runtime-1.10.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
161
- oarepo_runtime-1.10.0.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
162
- oarepo_runtime-1.10.0.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
163
- oarepo_runtime-1.10.0.dist-info/RECORD,,
159
+ oarepo_runtime-1.10.1.dist-info/METADATA,sha256=zCwp5S-_WPbVncdCa2Ceonl39ixjvE1YYIaacrXgW20,4789
160
+ oarepo_runtime-1.10.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
161
+ oarepo_runtime-1.10.1.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
162
+ oarepo_runtime-1.10.1.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
163
+ oarepo_runtime-1.10.1.dist-info/RECORD,,