Skip to content

Commit

Permalink
Fix Field.copy() not copying validators list
Browse files Browse the repository at this point in the history
  • Loading branch information
izxxr committed Feb 15, 2024
1 parent 87638c6 commit 7f53ffd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ Changelog

This page has changelogs for all releases of Oblate.

v1.3.0
------

Bug Fixes
~~~~~~~~~

- Fix :meth:`fields.Field.copy` not properly copying validators.

v1.2.1
------

Expand Down
2 changes: 2 additions & 0 deletions oblate/fields/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ class Game(oblate.Schema):
The new field.
"""
field = copy.copy(self)
field._validators = self._validators.copy()
field._raw_validators = self._raw_validators.copy()
field._unbind()
return field

Expand Down

0 comments on commit 7f53ffd

Please sign in to comment.