diff roundup/rest.py @ 5873:14f5c3179711

Fix lookup of labelprop in REST The label property by default is the alphabetically first one which turns out to be 'activity' in most cases, this is a protected property. So we need to also search protected properties when determining labelprop.
author Ralf Schlatterbeck <rsc@runtux.com>
date Tue, 27 Aug 2019 17:44:41 +0200
parents 1b91e3df3fd0
children 6630baff5f68
line wrap: on
line diff
--- a/roundup/rest.py	Mon Aug 26 23:11:28 2019 +0200
+++ b/roundup/rest.py	Tue Aug 27 17:44:41 2019 +0200
@@ -754,7 +754,8 @@
         # add verbose elements. 2 and above get identifying label.
         if verbose > 1:
             lp = class_obj.labelprop()
-            display_props[lp] = class_obj.properties[lp]
+            # Label prop may be a protected property like activity
+            display_props[lp] = class_obj.getprops (protected = True)[lp]
 
         # extract result from data
         result={}

Roundup Issue Tracker: http://roundup-tracker.org/