Skip to content
Snippets Groups Projects

Support giving a CachedElement to create_entity function

Merged Eva Bardou requested to merge cachedelem-create-entity into master
2 files
+ 11
4
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -4,6 +4,7 @@
from enum import Enum
from arkindex_worker import logger
from arkindex_worker.cache import CachedElement
from arkindex_worker.models import Element
@@ -24,8 +25,8 @@ class EntityMixin(object):
Return the ID of the created entity
"""
assert element and isinstance(
element, Element
), "element shouldn't be null and should be of type Element"
element, (Element, CachedElement)
), "element shouldn't be null and should be an Element or CachedElement"
assert name and isinstance(
name, str
), "name shouldn't be null and should be of type str"
Loading