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

bugfix: reporter is optional on update flow, reporter can be None #4866

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

wssheldon
Copy link
Contributor

@wssheldon wssheldon commented Jun 21, 2024

Resolves:

AttributeError
"'NoneType' object has no attribute 'individual'"

From:

    case_flows.case_update_flow(
        case_id=case.id,
        previous_case=previous_case,
        db_session=db_session,
        reporter_email=case.reporter.individual.email, <-------
        assignee_email=assignee_email,
        organization_slug=context["subject"].organization_slug,
    )

Solution:

Reporter is optional on cases, it can be None.

@wssheldon wssheldon requested a review from whitdog47 June 21, 2024 23:23
@wssheldon wssheldon self-assigned this Jun 21, 2024
@wssheldon wssheldon added the bug Something isn't working label Jun 21, 2024
@wssheldon
Copy link
Contributor Author

May need to be handled here too:

    if case.tactical_group:
        # we update the tactical group
        for group_member in [reporter_email, assignee_email]:
            group_flows.update_group(
                subject=case,
                group=case.tactical_group,
                group_action=GroupAction.add_member,
                group_member=group_member,
                db_session=db_session,
            )

@wssheldon wssheldon merged commit 0b2de50 into master Jun 21, 2024
8 checks passed
@wssheldon wssheldon deleted the bugfix/edit-submission branch June 21, 2024 23:37
metroid-samus pushed a commit that referenced this pull request Sep 25, 2024
)

* bugfix: reporter is optional on update flow, reporter can be None

* conditionally add group member to tactical group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants