Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Base Worker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Workers
Base Worker
Merge requests
!92
Support giving a CachedElement to create_entity function
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Support giving a CachedElement to create_entity function
cachedelem-create-entity
into
master
Overview
0
Commits
1
Pipelines
1
Changes
2
Merged
Eva Bardou
requested to merge
cachedelem-create-entity
into
master
3 years ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Expand
Closes
#60 (closed)
0
0
Merge request reports
Viewing commit
2f2e425e
Show latest version
2 files
+
11
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
2f2e425e
Support giving a CachedElement to create_entity function
· 2f2e425e
Eva Bardou
authored
3 years ago
arkindex_worker/worker/entity.py
+
3
−
2
Options
@@ -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 Cached
Element
"
assert
name
and
isinstance
(
name
,
str
),
"
name shouldn
'
t be null and should be of type str
"
Loading