8000 Fix #3 : `TypeError` while running tests with HStoreField by AyushDharDubey · Pull Request #6 · fossgis/3dmr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix #3 : TypeError while running tests with HStoreField #6

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

Merged
merged 2 commits into from
Jun 6, 2025

Conversation

AyushDharDubey
Copy link
Contributor

Closes #3

The issue stemmed from the pre_migrate signal not being triggered during the creation of Django's test database. As a result, the HStore extension was not initialized during test runs, leading to errors.

To address this, this PR replaces the custom pre_migrate signal handler with Django’s official HStoreExtension operation, added directly to the migrations. This ensures the extension is consistently installed across all environments, including test setups.

@lonvia lonvia merged commit 5a317a3 into fossgis:main Jun 6, 2025
1 check passed
@AyushDharDubey AyushDharDubey deleted the fix/3-hstorefield-type-error branch June 7, 2025 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

HStoreField behaves as str instead of dict during tests
2 participants
0