Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
skos
Commits
0256cb3dc9a1
Commit
5dd65b04
authored
Feb 19, 2018
by
Denis Laxalde
Browse files
Use entity_type method instead of deprecated entity_metas
The latter is deprecated since cubicweb 3.24. Related to #17133718.
parent
386b280bc7f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
dataimport.py
View file @
0256cb3d
...
...
@@ -38,7 +38,7 @@ def ext_dump_relations(cnx, extid2eid, extentity):
argument, to attempt to work around store's limitation on inlined relation.
"""
eid
=
extid2eid
[
extentity
.
extid
]
etype
=
cnx
.
entity_
metas
(
eid
)[
'type'
]
etype
=
cnx
.
entity_
type
(
eid
)
relations
=
[]
rschema
=
cnx
.
vreg
.
schema
.
rschema
for
subj
,
rtype
,
obj
in
dump_relations
(
cnx
,
eid
,
etype
):
...
...
@@ -120,7 +120,7 @@ def store_skos_extentities(cnx, store, entities, import_log,
except
KeyError
:
pass
else
:
if
extentity
.
etype
==
'Concept'
and
cnx
.
entity_
metas
(
eid
)[
'type'
]
==
'ExternalUri'
:
if
extentity
.
etype
==
'Concept'
and
cnx
.
entity_
type
(
eid
)
==
'ExternalUri'
:
# We have replaced the external uri by the new concept. As entities.extid column is
# unique, we've to drop the external uri before inserting the concept, so we:
# 1. record every relations from/to the external uri,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment