From fbb536f4ad37e18327b0a547ad35ec1771b96a98 Mon Sep 17 00:00:00 2001 From: Simon Voordouw Date: Tue, 13 Jun 2017 11:10:50 +0200 Subject: [PATCH] use correct lua not equal --- src/rest/api/api_printer.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest/api/api_printer.lua b/src/rest/api/api_printer.lua index 1463ab9..f328dd1 100644 --- a/src/rest/api/api_printer.lua +++ b/src/rest/api/api_printer.lua @@ -218,13 +218,13 @@ function M.fetch_POST(request, response) local gcodeFiles = " " local startCode = request:get("start_code") - if startCode != nil then + if not startCode then gcodeFiles = gcodeFiles .. '/tmp/startcode ' io.open('/tmp/startcode', 'w+').write(startCode) end local endCode = request:get("end_code") - if endCode != nil then + if not endCode then gcodeFiles = gcodeFiles .. '/tmp/endcode ' io.open('/tmp/endcode', 'w+').write(endCode) end