openSUSE / orthos2

Orthos is a machine administration tool.
GNU General Public License v2.0
14 stars 13 forks source link

Fix VirtualMachineAPIForm with missing configuration data #243

Closed SchoolGuy closed 7 months ago

SchoolGuy commented 7 months ago

This fixes the following CI failure:

ERROR: test_form (orthos2.api.tests.test_forms.VirtualMachineAPIFormTests)
Test the virtual machine creation API form
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/orthos2/orthos2/orthos2/api/tests/test_forms.py", line 29, in test_form
    form = VirtualMachineAPIForm(
  File "/home/runner/work/orthos2/orthos2/orthos2/frontend/forms.py", line 598, in __init__
    architectures, image_list = virtualization_api.get_image_list()
  File "/home/runner/work/orthos2/orthos2/orthos2/data/models/virtualizationapi.py", line 177, in get_image_list
    directory = '{}/{}/'.format(image_directory.rstrip('/'), architecture)
AttributeError: 'NoneType' object has no attribute 'rstrip'