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

feat: m2m_fields accepts field names #1243

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Conversation

legau
Copy link
Contributor

@legau legau commented Sep 4, 2023

Description

HistoricalRecords.m2m_fields should allow names of fields

Related Issue

Closes #1242

Motivation and Context

When working with inherited models we can't access the parent m2m field instance in the class definition

How Has This Been Tested?

Changing one m2m_field into a string

Checklist:

  • I have run the pre-commit run command to format and lint.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have added my name and/or github handle to AUTHORS.rst
  • I have added my change to CHANGES.rst
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Merging #1243 (35737fb) into master (4c66351) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1243   +/-   ##
=======================================
  Coverage   97.08%   97.09%           
=======================================
  Files          23       23           
  Lines        1271     1272    +1     
  Branches      208      209    +1     
=======================================
+ Hits         1234     1235    +1     
  Misses         19       19           
  Partials       18       18           
Files Changed Coverage Δ
simple_history/models.py 96.72% <100.00%> (+<0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@ddabble ddabble left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you 😊

@ddabble ddabble merged commit e2d7670 into jazzband:master Sep 5, 2023
19 checks passed
@19greg96
Copy link

Hi @ddabble ! Love this package and this is a great feature, which would allow simple history to be used in conjunction with django polymorphic. Can I kindly ask you to create a release in which this is included? I believe I am not authorized to initiate such an action, as I am not a maintainer of this JazzBand project, but it would really help me with a project I am working on.

@legau legau deleted the m2m_field_str branch October 30, 2023 15:41
@ddabble
Copy link
Member

ddabble commented Feb 26, 2024

@19greg96 Hey, sorry for the late reply! This is now included in version 3.5.0 🙂

@19greg96
Copy link

@19greg96 Hey, sorry for the late reply! This is now included in version 3.5.0 🙂

Yes, I have been tracking the progress recently. Thank you very much for your work!

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.

Using m2m_fields in inheritated models
3 participants