From aaf902bbb025442df82f705d495fa79bc4975254 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 5 Aug 2020 16:17:31 +0200 Subject: [PATCH] make loading prescrition file optional --- therapies/index.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/therapies/index.cgi b/therapies/index.cgi index 6284c00..515f2b0 100755 --- a/therapies/index.cgi +++ b/therapies/index.cgi @@ -58,7 +58,7 @@ mpxfile="${_DATA}/prescriptions/${id}.mpx" tpyfile="${_DATA}/therapies/${id}.tpy" vcf="$(pdi_load "$vcffile")" -mpx="$(sed '1s;^;\n;; s/:/;:/' "$mpxfile")" +mpx="$([ -f "$mpxfile" ] && sed '1s;^;\n;; s/:/;:/' "$mpxfile")" tpy="$(sed '1s;^;\n;; s/:/;:/' "$tpyfile")" VCF(){ pdi_value "$vcf" "$@"; } -- 2.39.2