Skip to content

Commit 53bb889

Browse files
committed
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.
1 parent cf846bf commit 53bb889

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

roundup/rest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,8 @@ def get_collection(self, class_name, input):
754754
# add verbose elements. 2 and above get identifying label.
755755
if verbose > 1:
756756
lp = class_obj.labelprop()
757-
display_props[lp] = class_obj.properties[lp]
757+
# Label prop may be a protected property like activity
758+
display_props[lp] = class_obj.getprops (protected = True)[lp]
758759

759760
# extract result from data
760761
result={}

0 commit comments

Comments
 (0)