fixed ngoduykhanh/PowerDNS-Admin issue 194

This commit is contained in:
thomasDOTde 2018-03-28 02:06:09 +02:00
parent c30cffd91c
commit f014798374

View File

@ -64,7 +64,10 @@ def inject_default_domain_table_size_setting():
@app.context_processor
def inject_auto_ptr_setting():
auto_ptr_setting = Setting.query.filter(Setting.name == 'auto_ptr').first()
return dict(auto_ptr_setting=strtobool(auto_ptr_setting.value))
if auto_ptr_setting is None:
return dict(auto_ptr_setting=False)
else:
return dict(auto_ptr_setting=strtobool(auto_ptr_setting.value))
# START USER AUTHENTICATION HANDLER
@app.before_request