rdmo icon indicating copy to clipboard operation
rdmo copied to clipboard

bug in Progress when a Section has no Pages

Open MyPyDavid opened this issue 10 months ago • 0 comments

Description / Beschreibung

When creating a Catalog where the Sections have no Pages (yet) a bug in the Project progress calculation arises and shows a 500 error.

Expected behaviour / Erwartetes Verhalten

no error

Steps to reproduce / Schritte zum Reproduzieren

  1. Create Catalog, Sections without Pages
  2. Click on Project > Answer Questions
  3. See error

Context / Kontext

Version 2.1.3

References / Verweise

  • https://github.com/rdmorganiser/rdmo/blob/c945d7d9ef5efdccb2d7b41b914ff50ea6f7b49c/rdmo/projects/progress.py#L56

File ".../rdmo/projects/progress.py", line 56, in compute_navigation 'first': catalog_section.elements[0].id if section.elements else None IndexError: list index out of range

MyPyDavid avatar Apr 22 '24 09:04 MyPyDavid