Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

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
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants