Skip to content

Commit

Permalink
revert back to inserting validator step at the same position if replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed Dec 15, 2024
1 parent 3738c29 commit 043f392
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dlt/extract/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ def validator(self) -> Optional[ValidateItem]:
@validator.setter
def validator(self, validator: Optional[ValidateItem]) -> None:
"""Add/remove or replace the validator in pipe"""
self._pipe.remove_by_type(ValidateItem)
step_no = self._pipe.remove_by_type(ValidateItem)
if validator:
self.add_step(validator)
self.add_step(validator, insert_at=step_no if step_no >= 0 else None)

@property
def max_table_nesting(self) -> Optional[int]:
Expand Down

0 comments on commit 043f392

Please sign in to comment.