Skip to content

Commit ac0bea8

Browse files
committed
corrected merged issues & dependencies issues
1 parent b04d9e3 commit ac0bea8

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

src/opengeodeweb_back/routes/blueprint_routes.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -247,18 +247,7 @@ def save_viewable_file():
247247
secure_filename = werkzeug.utils.secure_filename(flask.request.json["filename"])
248248
file_path = os.path.abspath(os.path.join(UPLOAD_FOLDER, secure_filename))
249249
data = geode_functions.load(flask.request.json["input_geode_object"], file_path)
250-
<<<<<<< HEAD
251250
response_data = utils_functions.create_response_with_binary_light_viewable(flask.request.json["input_geode_object"], data, DATA_FOLDER_PATH)
252-
=======
253-
generated_id = str(uuid.uuid4()).replace("-", "")
254-
name = data.name()
255-
object_type = geode_functions.get_object_type(
256-
flask.request.json["input_geode_object"]
257-
)
258-
response_data = utils_functions.create_geode_object_response(
259-
flask.request.json["input_geode_object"], data, DATA_FOLDER_PATH
260-
)
261-
>>>>>>> 850db36bc3cfa160172b32485df1623e5714d7b8
262251
return flask.jsonify(response_data), 200
263252

264253

@@ -280,15 +269,8 @@ def create_point():
280269
builder.create_point(opengeode.Point3D([x, y, z]))
281270
builder.set_name(title)
282271
return flask.make_response(
283-
<<<<<<< HEAD
284272
utils_functions.create_response_with_binary_light_viewable("PointSet3D", PointSet3D, DATA_FOLDER_PATH),
285273
200,
286-
=======
287-
utils_functions.create_geode_object_response(
288-
"PointSet3D", PointSet3D, DATA_FOLDER_PATH
289-
),
290-
200,
291-
>>>>>>> 850db36bc3cfa160172b32485df1623e5714d7b8
292274
)
293275

294276

src/opengeodeweb_back/utils_functions.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,7 @@ def validate_request(request, schema):
8787
validate(json_data)
8888
except fastjsonschema.JsonSchemaException as e:
8989
error_msg = str(e)
90-
91-
if "data must contain" in error_msg:
92-
field = error_msg.split("data must contain ['")[1].split("']")[0]
93-
error_msg = f"'{field}' is a required property"
94-
elif "data must not contain" in error_msg:
95-
field = error_msg.split("data must not contain {'")[1].split("'")[0]
96-
error_msg = f"Additional properties are not allowed ('{field}' was unexpected)"
97-
98-
flask.abort(400, f"Validation error: {error_msg}")
99-
90+
flask.abort(400, error_msg)
10091

10192
def set_interval(func, sec, args=None):
10293
def func_wrapper():

0 commit comments

Comments
 (0)