From eebf47e459a51288494ca2a3c8ae19a0ffbf4eac Mon Sep 17 00:00:00 2001 From: Anuja Date: Thu, 26 Apr 2012 15:45:13 +0530 Subject: Modified Relation and Attribute admin forms --- gstudio/views/ajaxviews.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'gstudio/views') diff --git a/gstudio/views/ajaxviews.py b/gstudio/views/ajaxviews.py index a909db26..8fbb6e03 100644 --- a/gstudio/views/ajaxviews.py +++ b/gstudio/views/ajaxviews.py @@ -308,12 +308,10 @@ def selectionlist_UP(obj): membs=eachchild.objecttypes.all() def selectionlist_OB(obj): global rlist - - obs=Gbobject.objects.filter(title=obj) + obs=Objecttype.objects.get(title=obj) #Get all members of OB - if obs: - obs=Gbobject.objects.get(title=obj) - rlist=additemdict(rlist,obs) + for each in obs.member_objects.all(): + rlist=additemdict(rlist,each) return rlist -- cgit v1.2.3-70-g09d2