1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

metadata: don't crash if metadata includes blank Categories list

If someone includes just 'Categories:', it shouldn't crash.
This commit is contained in:
Hans-Christoph Steiner 2017-03-23 23:13:37 +01:00
parent baeae862ad
commit 7d4176dd50

View File

@ -815,6 +815,8 @@ def post_metadata_parse(app):
if isinstance(app.Categories, str):
app.Categories = [app.Categories]
elif app.Categories is None:
app.Categories = ['None']
else:
app.Categories = [str(i) for i in app.Categories]