Skip to content

Commit

Permalink
Checks?
Browse files Browse the repository at this point in the history
  • Loading branch information
mboudet committed Aug 26, 2021
1 parent e049d40 commit e673f18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions askomics/libaskomics/GffFile.py
Expand Up @@ -103,7 +103,7 @@ def integrate(self, dataset_id, entities=[], attributes={}, public=True):
self.set_preview()
self.entities_to_integrate = self.entities

if attributes:
if attributes and isinstance(attributes, dict):
self.attributes_to_integrate = attributes

File.integrate(self, dataset_id=dataset_id)
Expand Down Expand Up @@ -186,9 +186,9 @@ def generate_rdf_content(self):
for feature in rec.features:

filter_attributes = False
selected_attributes = self.attributes_to_integrate.get(feature.type, [])

if selected_attributes:
selected_attributes = self.attributes_to_integrate.get(feature.type)
# Sanity check
if self.attributes_to_integrate and isinstance(selected_attributes, list):
filter_attributes = True

# Entity type
Expand Down

0 comments on commit e673f18

Please sign in to comment.