Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Group' object has no attribute 'user_set' #16095

Closed
CTV-2023 opened this issue May 12, 2024 · 0 comments
Closed

'Group' object has no attribute 'user_set' #16095

CTV-2023 opened this issue May 12, 2024 · 0 comments

Comments

@CTV-2023
Copy link

Deployment Type

Self-hosted

NetBox Version

v4.0.0

Python Version

3.11

Steps to Reproduce

Hi,

Following this discussion
#16000
I think I found a regression or missing feature between Django user/group models and Netbox models

If in a custom pipeline, calling netbox authentication model with
from netbox.authentication import Group

I can't add users to a group with group.user_set.add(user)

<class 'AttributeError'>

'Group' object has no attribute 'user_set'

I can still add groups to a user with user.groups.add(group)

(many to many relationship issue ?)

Expected Behavior

I should be able to add users to a group, like I can add groups to user

Observed Behavior

Regression from Django

@CTV-2023 CTV-2023 added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels May 12, 2024
@abhi1693 abhi1693 removed type: bug A confirmed report of unexpected behavior in the application status: needs triage This issue is awaiting triage by a maintainer labels May 13, 2024
@netbox-community netbox-community locked and limited conversation to collaborators May 13, 2024
@abhi1693 abhi1693 converted this issue into discussion #16098 May 13, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants