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

[ORCA-3475] Make event orchestration team ID a nullable field #4

Merged
merged 1 commit into from
May 10, 2022

Conversation

alenapan
Copy link
Owner

@alenapan alenapan commented May 10, 2022

Changes

In order to reset the team ID on orchestration the PUT endpoint payload should look like this:

{
    "orchestration": { 
        "name": "Orch 1",
        "team": {
            "id": null
        }
    }
}

With team.ID being string instead of *string we couldn't set ID to nil (because Go doesn't allow assigning nil to variables of type string) and had to use an empty string instead, which is not supported by the API.

This PR makes the team Id property a pointer to the string type that allows us to set it to nil when necessary.

Testing

image

Copy link
Collaborator

@tyurina tyurina left a comment

Choose a reason for hiding this comment

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

Got bored of my ticket so I decided to review this one 😅 , nice I learned a lot from this https://www.sohamkamani.com/golang/omitempty/

@alenapan alenapan merged commit 4071eac into master May 10, 2022
@alenapan alenapan deleted the ORCA-3475-event-orch-allow-nullable-props branch May 10, 2022 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants