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

Fix 'NoneType' object has no attribute 'name' on export #154

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

timonegk
Copy link
Member

When a team is deleted, its image sets are kept, but the team is changed to None. When the annotations of the set are exported, the team name is accessed which results in the above mentioned error. Now, the team name will be replaced with an empty string if the team is None.

Closes #153.

@timonegk timonegk requested review from lilioid and NFiedler October 15, 2020 07:44
@timonegk timonegk force-pushed the fix/team_can_be_none branch from b88eafc to 2554ff2 Compare October 15, 2020 07:50
Copy link
Member

@Flova Flova left a comment

Choose a reason for hiding this comment

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

Maybe you could add a deleted_team instead of the blank string. This could result on unexpected behavior if e.g. someone parses the name and expect a name.

@timonegk
Copy link
Member Author

What do you think about DELETED?

@timonegk timonegk force-pushed the fix/team_can_be_none branch from 2554ff2 to cc6cfa6 Compare October 15, 2020 07:53
@Flova
Copy link
Member

Flova commented Oct 15, 2020

Sounds good. I think it is clearer if the name goes like go_2020_DELETED.zip instead of go_2020__.zip

When a team is deleted, its image sets are kept, but the team is changed
to None. When the annotations of the set are exported, the team name is
accessed which results in the above mentioned error. Now, the team name
will be replaced with an empty string if the team is None.
@timonegk timonegk force-pushed the fix/team_can_be_none branch from cc6cfa6 to 392d30a Compare October 15, 2020 07:55
@timonegk
Copy link
Member Author

Okay, I chose DeletedTeam.

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.

Cant export Annotation
3 participants