I think I have it figured out but please check my understanding.   I was
confused with the groupname vs group field.  It looks like if I update the
foriegn key field group the groupname field will update automatically.

On Wed, Feb 27, 2019, 9:28 PM A Stanley <[email protected]> wrote:

> I'm trying to figure out how to update a users group programaticaly and
> I'm not sure where to start.  I have a user instance and can query the
> users existing groups
>
> group = self.request.user.radiususergroup_set.order_by('priority').first()
>> # user may not have a group defined
>> groupname = group.groupname if group else None
>> print(groupname)
>>
>> But I don't know how to change the current group or add a new group in
> django-freeradius.  I'll keep reading the code to figure it out but any
> hints would be appreciated.
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to