Skip to content

Commit

Permalink
easier code
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Jan 16, 2025
1 parent 54e24d8 commit 8d5a307
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dispatcher_plugin_nb2workflow/products.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,7 @@ def get_html_draw(self):
# Note that if criteria are not met, it will end up with taking the last extension.
# In the case a new instrument is added, a further adaptation might be needed.
data_id = 0
if len(self.dispatcher_data_prod.data.data_unit) == 1:
data_id = 0
else:
if len(self.dispatcher_data_prod.data.data_unit) >= 1:
for unit_id, unit in enumerate(self.dispatcher_data_prod.data.data_unit):
if unit.header.get('IMATYPE', '') == 'SIGNIFICANCE' and unit.header.get('XTENSION', '') == 'IMAGE':
data_id = unit_id
Expand Down

0 comments on commit 8d5a307

Please sign in to comment.