From cf63d00e4c096eec1c280dd295c8ed0033189cb7 Mon Sep 17 00:00:00 2001
From: David Fairbrother <DavidFair@users.noreply.github.com>
Date: Tue, 25 Feb 2020 10:52:51 +0000
Subject: [PATCH] Re #28066 Fix incorrect err message converting empty string

Fixes an incorrectly emitted message when trying to convert an empty
string into a StateShape object
---
 scripts/SANS/sans/gui_logic/models/RowEntries.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/SANS/sans/gui_logic/models/RowEntries.py b/scripts/SANS/sans/gui_logic/models/RowEntries.py
index 1e1b84db178..0b76fac2d9a 100644
--- a/scripts/SANS/sans/gui_logic/models/RowEntries.py
+++ b/scripts/SANS/sans/gui_logic/models/RowEntries.py
@@ -82,7 +82,11 @@ class RowEntries(_UserEntries):
 
     @sample_shape.setter
     def sample_shape(self, val):
-        if val is SampleShape:
+        if not val:
+            self._sample_shape = None
+            return
+
+        if isinstance(val, SampleShape):
             self._sample_shape = val
             return
 
-- 
GitLab