Skip to content

Commit e82a8b5

Browse files
Fix return type of update when there is no input and we are returning data (#57)
1 parent b8246ff commit e82a8b5

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 3.2.4 (2025-09-02)
4+
5+
#### Fixes
6+
7+
- Modify how `typing-extensions` is imported to avoid needing it as runtime dependency by [@max-muoto](https://github.com/max-muoto) in [#56](https://github.com/AmbitionEng/django-pgbulk/pull/56).
8+
- Fix return type of `pgbulk.update` when there is no input and returning is not `None` by [@wesleykendall](https://github.com/wesleykendall) in [#57](https://github.com/AmbitionEng/django-pgbulk/pull/57).
9+
310
## 3.2.3 (2025-08-16)
411

512
#### Fixes

pgbulk/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def _update(
581581

582582
# If we do not have any values or fields to update, just return
583583
if len(row_values) == 0 or len(update_fields) == 0:
584-
return None
584+
return [] if returning else None
585585

586586
db_types = [model._meta.get_field(field).db_type(connection) for field in value_fields]
587587

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ packages = [
2727
exclude = [
2828
"*/tests/"
2929
]
30-
version = "3.2.3"
30+
version = "3.2.4"
3131
description = "Native Postgres update, upsert, and copy operations."
3232
authors = ["Wes Kendall"]
3333
classifiers = [

0 commit comments

Comments
 (0)