1
0
mirror of https://github.com/tiyn/stud.ip-crawler.git synced 2025-07-04 03:37:47 +02:00

FIX: Skip dirs without id or name instead of aborting

There are directories now that contain neither a name or an id
delivered by the API for some reason, looking like this:
{
    'is_visible': True,
    'is_readable': False,
    'is_writable': True
}
which makes no sense at all. If such a directory is given the
processing is stopped here and all further directories are ignored.
This should not be the case.

This commit fixes this behavior, so that all directories are processed
as expected.
This commit is contained in:
myphs 2022-05-21 16:52:21 +02:00 committed by GitHub
parent e64d48a8c5
commit 0a5cada92d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,5 +176,5 @@ class Studip:
sub_name = subdir['name'] sub_name = subdir['name']
res_subdirs[sub_id] = sub_name res_subdirs[sub_id] = sub_name
except KeyError: except KeyError:
return res_subdirs continue
return res_subdirs return res_subdirs