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

Fix creation of model instances with related model fields #164

Merged
merged 4 commits into from
Mar 12, 2021

Commits on Mar 9, 2021

  1. Allow id to be used as FK default (Fix #136)

    #117 introduced an issue for cases where `id` values is provided as a default for foreign keys.
    This PR attempts to fix that issue by checking if generated value for FK field is an instance of this model - if not it uses `_id` as a field name (https://docs.djangoproject.com/en/3.1/ref/models/fields/#database-representation).
    Rust Saiargaliev committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    035281c View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2021

  1. Another fix idea: use default unless given custom argument

    Rust Saiargaliev committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    73ac0d3 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2021

  1. Remove old way, do some cleanup

    Rust Saiargaliev committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    62c3843 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG.md

    Rust Saiargaliev committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    f0f1300 View commit details
    Browse the repository at this point in the history