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

chore: add clean_tilelayer management command #1670

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

yohanboniface
Copy link
Member

It can be useful to manage the tilelayer registered in the map settings in db.

@yohanboniface yohanboniface force-pushed the clean-tilelayer-command branch 5 times, most recently from d6f1574 to 560ce10 Compare March 4, 2024 16:37
Copy link
Member

@almet almet left a comment

Choose a reason for hiding this comment

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

LGTM, except the SQL statements (or the tests) are not passing on the CI.

with connection.cursor() as cursor:
ret = cursor.execute(
"UPDATE umap_map "
"SET settings['properties'] = (settings->'properties') - 'tilelayer'"
Copy link
Member

Choose a reason for hiding this comment

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

Nice syntax :-)

ret = cursor.execute(
"UPDATE umap_map "
"SET settings['properties']['tilelayer']['url_template'] = %s "
"WHERE settings->'properties'->'tilelayer'->'url_template' = %s",
Copy link
Member

Choose a reason for hiding this comment

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

Tests seems to be failing because of this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, it passes with my local psql (16), but not with the version 13 of the CI. I've tried many syntaxes, but blindly and without success. I'd need to run a version 13 locally I'd say.

@yohanboniface yohanboniface force-pushed the clean-tilelayer-command branch from 560ce10 to 87e2c37 Compare August 15, 2024 10:28
It can be useful to manage the tilelayer registered in the map
settings in db.
@yohanboniface yohanboniface force-pushed the clean-tilelayer-command branch from 87e2c37 to 33c6ee7 Compare September 12, 2024 09:53
@yohanboniface yohanboniface merged commit 5836ae8 into master Sep 26, 2024
4 checks passed
@yohanboniface yohanboniface deleted the clean-tilelayer-command branch September 26, 2024 07:20
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