Skip to content

Commit

Permalink
supplier_prefix = get_prefix(str(prov_subject.res))
Browse files Browse the repository at this point in the history
  • Loading branch information
arcangelo7 committed Mar 18, 2024
1 parent d29baf3 commit fcfa42f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions oc_ocdm/prov/prov_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def add_se(self, prov_subject: GraphEntity, res: URIRef = None) -> SnapshotEntit
if res is not None and res in self.res_to_entity:
return self.res_to_entity[res]
g_prov: str = str(prov_subject) + "/prov/"
supplier_prefix = get_prefix(res) if res is not None else self.supplier_prefix
supplier_prefix = get_prefix(str(prov_subject.res))
cur_g, count, label = self._add_prov(g_prov, "se", prov_subject, res, supplier_prefix)
return SnapshotEntity(prov_subject, cur_g, self, res, prov_subject.resp_agent,
prov_subject.source, ProvEntity.iri_entity, count, label, "se")
Expand Down Expand Up @@ -144,7 +144,6 @@ def generate_provenance(self, c_time: float = None) -> set:
update_query: str = get_update_query(cur_subj, entity_type="graph")[0]
was_modified: bool = (update_query != "")
snapshots_list: List[SnapshotEntity] = self._get_snapshots_from_merge_list(cur_subj)

if was_modified and len(snapshots_list) <= 0:
# MODIFICATION SNAPSHOT
last_snapshot: SnapshotEntity = self.add_se(prov_subject=cur_subj, res=last_snapshot_res)
Expand All @@ -159,7 +158,6 @@ def generate_provenance(self, c_time: float = None) -> set:
# MERGE SNAPSHOT
last_snapshot: SnapshotEntity = self.add_se(prov_subject=cur_subj, res=last_snapshot_res)
last_snapshot.has_invalidation_time(cur_time)

cur_snapshot: SnapshotEntity = self._create_snapshot(cur_subj, cur_time)
cur_snapshot.derives_from(last_snapshot)
for snapshot in snapshots_list:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "oc_ocdm"
version = "7.3.4"
version = "7.3.5"
description = "Object mapping library for manipulating RDF graphs that are compliant with the OpenCitations datamodel."
authors = [
"Silvio Peroni <essepuntato@gmail.com>",
Expand Down

0 comments on commit fcfa42f

Please sign in to comment.