mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
handle App instance with no Builds when writing YAML
This commit is contained in:
parent
3e6b7062b6
commit
abe422fd7a
1 changed files with 4 additions and 2 deletions
|
|
@ -1051,8 +1051,10 @@ def write_yaml(mf, app):
|
||||||
# next iteration will need to insert a newline
|
# next iteration will need to insert a newline
|
||||||
insert_newline = True
|
insert_newline = True
|
||||||
else:
|
else:
|
||||||
if (hasattr(app, field) and getattr(app, field)) or field is 'Builds':
|
if app.get(field) or field is 'Builds':
|
||||||
|
# .txt calls it 'builds' internally, everywhere else its 'Builds'
|
||||||
if field is 'Builds':
|
if field is 'Builds':
|
||||||
|
if app.get('builds'):
|
||||||
cm.update({field: _builds_to_yaml(app)})
|
cm.update({field: _builds_to_yaml(app)})
|
||||||
elif field is 'CurrentVersionCode':
|
elif field is 'CurrentVersionCode':
|
||||||
cm.update({field: _field_to_yaml(TYPE_INT, getattr(app, field))})
|
cm.update({field: _field_to_yaml(TYPE_INT, getattr(app, field))})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue