Skip to content
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

Adding organization_id to ActivationKey entity #990

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nailgun/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def __init__(self, server_config=None, **kwargs):
Organization,
required=True,
),
'organization_id': entity_fields.IntegerField(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's organization field already present, so not sure why organization_id field is required here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API was giving weird responses from what @ColeHiggins2 showed me when using org, but adding org_id helped.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me take a look at it. Nailgun itself should take care of including organization_id in the HTTP request.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ogajduse if you look at this response.
Received HTTP 404 response: {"displayMessage":"One of parameters [ organization_id ] required but not specified."

organization_id is not being passed in. Even when I played around with the existing organization entity. I could not get the ID from it.

'purpose_usage': entity_fields.StringField(),
'purpose_role': entity_fields.StringField(),
'purpose_addons': entity_fields.ListField(),
Expand Down