Skip to content

Commit

Permalink
chore: ignore at the correct spot
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Nov 27, 2024
1 parent 4a5d054 commit c19475d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions algoliasearch_django/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ def __init__(self, model=None):
def __enter__(self):
for model in self.models:
post_save.disconnect(
algolia_engine._AlgoliaEngine__post_save_receiver,
sender=model, # pyright: ignore
algolia_engine._AlgoliaEngine__post_save_receiver, # pyright: ignore
sender=model,
)
pre_delete.disconnect(
algolia_engine._AlgoliaEngine__pre_delete_receiver,
sender=model, # pyright: ignore
algolia_engine._AlgoliaEngine__pre_delete_receiver, # pyright: ignore
sender=model,
)

def __exit__(self, exc_type, exc_value, traceback):
for model in self.models:
post_save.connect(
algolia_engine._AlgoliaEngine__post_save_receiver,
sender=model, # pyright: ignore
algolia_engine._AlgoliaEngine__post_save_receiver, # pyright: ignore
sender=model,
)
pre_delete.connect(
algolia_engine._AlgoliaEngine__pre_delete_receiver,
sender=model, # pyright: ignore
algolia_engine._AlgoliaEngine__pre_delete_receiver, # pyright: ignore
sender=model,
)

0 comments on commit c19475d

Please sign in to comment.