File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
55and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
66
7+ ## [ 0.4.0]
8+ - Rename internal ` user ` attribute from ` VirtualModel ` to ` _user ` to avoid conflict with ForeignKey and OneToOneField fields with the same name
9+
710## [ 0.3.0]
811
912- Include ` py.typed ` file for type hints
Original file line number Diff line number Diff line change 11"""Top-level package for django_virtual_models."""
22import logging
33
4- __version__ = "0.3 .0"
4+ __version__ = "0.4 .0"
55
66# Good practice: https://docs.python-guide.org/writing/logging/#logging-in-a-library
77logging .getLogger (__name__ ).addHandler (logging .NullHandler ())
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ def __init__(
199199 if to_attr is not None and lookup is None :
200200 raise InvalidVirtualModelParams ("Always provide a `lookup` when providing a `to_attr`" )
201201
202- self .user = user
202+ self ._user = user
203203 if manager is None :
204204 self .manager = self .Meta .model ._default_manager
205205 self .model_cls = self .Meta .model
@@ -352,7 +352,7 @@ def get_optimized_queryset(
352352 new_qs = self ._hydrate_queryset_with_nested_declared_fields (
353353 qs = qs ,
354354 lookup_list = new_lookup_list ,
355- user = self .user ,
355+ user = self ._user ,
356356 ** kwargs ,
357357 )
358358 new_qs = _defer_fields (
You can’t perform that action at this time.
0 commit comments