Fix: Slicing profiles now can always be set as default

Previously depended on the slicer being already configured, which is not
really necessary.

Closes #956
This commit is contained in:
Gina Häußge 2015-06-28 02:21:30 +02:00
parent 29b047bf09
commit 13ac06c6dc

View file

@ -57,7 +57,7 @@ def slicingListSlicerProfiles(slicer):
@api.route("/slicing/<string:slicer>/profiles/<string:name>", methods=["GET"])
def slicingGetSlicerProfile(slicer, name):
try:
profile = slicingManager.load_profile(slicer, name)
profile = slicingManager.load_profile(slicer, name, require_configured=False)
except UnknownSlicer:
return make_response("Unknown slicer {slicer}".format(**locals()), 404)
except UnknownProfile:
@ -106,7 +106,7 @@ def slicingPatchSlicerProfile(slicer, name):
return make_response("Expected content-type JSON", 400)
try:
profile = slicingManager.load_profile(slicer, name)
profile = slicingManager.load_profile(slicer, name, require_configured=False)
except UnknownSlicer:
return make_response("Unknown slicer {slicer}".format(**locals()), 404)
except UnknownProfile: