Skip to content

Commit

Permalink
[5.1] Add from_queryset param to (a)refresh_from_db()
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Oct 12, 2024
1 parent 6bfd210 commit 029e725
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions django-stubs/db/models/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,18 @@ class Model(metaclass=ModelBase):
using: str | None = None,
update_fields: Iterable[str] | None = None,
) -> None: ...
def refresh_from_db(self, using: str | None = None, fields: Iterable[str] | None = None) -> None: ...
async def arefresh_from_db(self, using: str | None = None, fields: Iterable[str] | None = None) -> None: ...
def refresh_from_db(
self,
using: str | None = None,
fields: Iterable[str] | None = None,
refresh_from_db: QuerySet[Self] | None = None,
) -> None: ...
async def arefresh_from_db(
self,
using: str | None = None,
fields: Iterable[str] | None = None,
refresh_from_db: QuerySet[Self] | None = None,
) -> None: ...
def serializable_value(self, field_name: str) -> Any: ...
def prepare_database_save(self, field: Field) -> Any: ...
def get_deferred_fields(self) -> set[str]: ...
Expand Down

0 comments on commit 029e725

Please sign in to comment.