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

Correctly return nillable for relations in md.xsd #3951

Merged
merged 1 commit into from
Aug 14, 2018

Conversation

arnaud-morvan
Copy link
Member

@arnaud-morvan arnaud-morvan commented Aug 2, 2018

Copy link
Member

@sbrunner sbrunner left a comment

Choose a reason for hiding this comment

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

Just one interrogation, and the tests should be adapted :-)
Also that's looks good :-)


def __get__(self, obj, type_=None):
if obj is None:
# For "hybrid" descriptors that work both at the instance
# and class levels we could return an SQL expression here.
# The code of hybrid_property in SQLAlchemy illustrates
# how to do that.
raise AttributeError # pragma: no cover
return self
Copy link
Member

Choose a reason for hiding this comment

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

This change looks strange to me ...

Copy link
Member Author

Choose a reason for hiding this comment

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

I get it from sqlalchemy.ext.AssociationProxy class.

@arnaud-morvan
Copy link
Member Author

Tests completed now, should be ready for merge once travis is happy.

@camptocamp camptocamp deleted a comment Aug 14, 2018
@arnaud-morvan arnaud-morvan merged commit 852388e into 2.2 Aug 14, 2018
@arnaud-morvan arnaud-morvan deleted the association_proxy_nullable branch August 14, 2018 14:17
@sbrunner sbrunner added this to the 2.2 milestone Aug 14, 2018
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