Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Call parent's init before field initialisation, not after #730

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

nolar
Copy link
Contributor

@nolar nolar commented Oct 4, 2023

As a rule, super().__init__() MUST:

  • Always be called (never skipped; especially with this complex system of mixins).
  • Always be called before anything else is set on the object.

Otherwise, the parent class'es constructor overwrites the properly pre-initialized self.default_schema to None, and this breaks the table name resolution.

@nolar nolar requested review from dlawin and vvkh October 4, 2023 16:58
@nolar nolar merged commit 076fff2 into master Oct 4, 2023
@nolar nolar deleted the fix-init-order branch October 4, 2023 17:17
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants