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

Don't exclude properties everywhere #4331

Merged
merged 1 commit into from
Nov 21, 2018
Merged

Don't exclude properties everywhere #4331

merged 1 commit into from
Nov 21, 2018

Conversation

sbrunner
Copy link
Member

@sbrunner sbrunner commented Nov 21, 2018

Fix regression introduced by 496e2bb

Mainly we shouldn't exclude the lastUpdateDateColumn and lastUpdateUserColumn on insert or update operation otherwise we can't set them.

def get_layer_class(layer, with_exclude=False):
if with_exclude:
# Exclude the columns used to record the last features update
exclude = [] if layer.exclude_properties is None else layer.exclude_properties.split(",")
Copy link
Member

Choose a reason for hiding this comment

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

layer.exclude_properties is not part of "the columns used to record the last features update"
It seems that this line shoud be outside of if block.
I suppose we don't need "excluded properties" in select / insert / update operations.

Copy link
Member Author

Choose a reason for hiding this comment

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

@arnaud-morvan I don't understand your comment, as I understand the start say the opposite of the end of your comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Note that with_exclude=False is mostly for insert / update operations, and with_exclude=True for metadata operations (Layertree, xsd, lingua)

Fix regression introduced by
496e2bb
@sbrunner sbrunner merged commit d6ac224 into 2.2 Nov 21, 2018
@sbrunner sbrunner deleted the fix-edited-user branch November 21, 2018 09:54
sbrunner added a commit that referenced this pull request Nov 23, 2018
sbrunner added a commit that referenced this pull request Nov 23, 2018
sbrunner added a commit that referenced this pull request Nov 23, 2018
sbrunner added a commit that referenced this pull request Nov 23, 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.

3 participants