Verified Commit 2eda77ab authored by Dan Jones's avatar Dan Jones
Browse files

fix: correct argparse default behaviour

......@@ -82,7 +82,8 @@ def get_swagger_config():
+ "platform_status_encoded",
"acknowledgement": "#/components/schemas/acknowledgement",
"survey": "#/components/schemas/survey",
"survey_encoded": "#/components/schemas/" + "survey_encoded",
"survey_encoded": "#/components/schemas/"
+ "survey_encoded",
},
},
"oneOf": [
......@@ -194,7 +195,7 @@ def import_remote_refs(swagger_config):
returns True if all schemas resolved and injected
"""
# For some reason importing Feature or FeatureCollection
# makes the schema fail to validate
# makes the schema fail to validate
ref_imports = [
# "https://geojson.org/schema/Feature.json",
......@@ -315,7 +316,7 @@ def get_options():
args = parser.parse_args()
config = vars(args)
# If no flag is specified default to running the flask server
if all(v is False for v in config.values()):
if not (config['run_flask'] or config['output_file']):
config["run_flask"] = True
return config
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment