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 attribute errors when unloading a model #258

Merged
merged 2 commits into from Jan 12, 2020
Merged

Conversation

amolenaar
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes

What is the current behavior?

When closing (flushing) a model (e.g. gaphor/UML/uml2.gaphor) a lot of errors show up:

gaphor.UML.properties ERROR Failed to unlink _stub_7fb1e478f990 from <gaphor.UML.uml2.Class object at 0x7fb1e479cdd0>
Traceback (most recent call last):
  File "/home/arjan/Development/gaphor/gaphor/UML/properties.py", line 549, in unlink
    values = getattr(obj, self._name)
AttributeError: 'Class' object has no attribute '_stub_7fb1e478f990'

Issue Number: N/A

What is the new behavior?

No more errors. This behavior is expected.
The code has been written in a way that expresses the intent more clearly.

Does this PR introduce a breaking change?

  • Yes
  • No

Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

👍

@danyeaw danyeaw merged commit 6611781 into master Jan 12, 2020
@danyeaw danyeaw deleted the fix-model-unloading branch January 12, 2020 01:36
@danyeaw danyeaw added chore Maintenance related PR bug An issue in the application and removed chore Maintenance related PR labels Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue in the application
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants