🐛 Return 409 on select command if print is ongoing

Closes #3525
This commit is contained in:
Gina Häußge committed 2020-04-20 13:39:58 +02:00
1 parent aab012d530
commit 2cb8b03f7b
2 files changed
+7 -2

No files matched your search

+3
View File
@@ -535,6 +535,9 @@ def gcodeFileCommand(filename, target):
if not octoprint.filemanager.valid_file_type(filename, type="machinecode"):
return make_response("Cannot select {filename} for printing, not a machinecode file".format(**locals()), 415)
if not printer.is_ready():
return make_response("Printer is already printing, cannot select a new file", 409)
printAfterLoading = False
if "print" in data and data["print"] in valid_boolean_trues:
with Permissions.PRINT.require(403):