mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
rewritemeta: rewrite AntiFeature str entries like Categories
This commit is contained in:
parent
6e6afeec65
commit
58b14279af
1 changed files with 8 additions and 4 deletions
|
|
@ -901,10 +901,14 @@ def post_metadata_parse(app):
|
||||||
if 'flavours' in app and app['flavours'] == [True]:
|
if 'flavours' in app and app['flavours'] == [True]:
|
||||||
app['flavours'] = 'yes'
|
app['flavours'] = 'yes'
|
||||||
|
|
||||||
if isinstance(app.Categories, str):
|
for field, fieldtype in fieldtypes.items():
|
||||||
app.Categories = [app.Categories]
|
if fieldtype != TYPE_LIST:
|
||||||
else:
|
continue
|
||||||
app.Categories = [str(i) for i in app.Categories]
|
value = app.get(field)
|
||||||
|
if isinstance(value, str):
|
||||||
|
app[field] = [value, ]
|
||||||
|
elif value is not None:
|
||||||
|
app[field] = [str(i) for i in value]
|
||||||
|
|
||||||
def _yaml_bool_unmapable(v):
|
def _yaml_bool_unmapable(v):
|
||||||
return v in (True, False, [True], [False])
|
return v in (True, False, [True], [False])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue