We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9488f56 commit 7d2a7e0Copy full SHA for 7d2a7e0
openaleph_procrastinate/util.py
@@ -7,16 +7,12 @@
7
log = get_logger(__name__)
8
9
10
-def make_stub_entity(
11
- e: E,
12
- entity_type: Type[E] | None = ValueEntity,
13
-) -> E | None:
+def make_stub_entity(e: E, entity_type: Type[E] | None = ValueEntity) -> E:
14
"""
15
Reduce an entity to its ID and schema
16
17
if not e.id:
18
- log.warning("Entity has no ID!")
19
- return
+ raise RuntimeError("Entity has no ID!")
20
return make_entity(
21
{"id": e.id, "schema": e.schema.name, "caption": e.caption}, entity_type
22
)
0 commit comments