From 662cdbc3e9f69eebdc3f527676da71e78aaedc12 Mon Sep 17 00:00:00 2001
From: A Nilsen <ban@nibio.no>
Date: Mon, 1 May 2023 07:57:48 +0000
Subject: [PATCH] Inkl. error message hvis prosjekttype ikke er satt

---
 get_nib.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/get_nib.py b/get_nib.py
index e3e9ff0..15cceb0 100644
--- a/get_nib.py
+++ b/get_nib.py
@@ -673,6 +673,9 @@ class getnib:
                 param ='{Filter:"ortofototype in (6,7)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',StopOnCover:false}'
             if ir and not sat and not of:
                 param ='{Filter:"ortofototype in (7)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',StopOnCover:false}'
+            if not of and not sat and not ir:
+                self.iface.messageBar().pushMessage("Error", "project type must be set", level=Qgis.Critical, duration=3)
+                return
           
             # para=parse.quote('{Filter:"ortofototype in (1,2,3,4,5,6,7,8,9)",Coordinates:"'+coords+'",InputWKID:'+str(crs_proj_int)+',StopOnCover:false}')
             para=parse.quote(param)
-- 
GitLab