Skip to content

Commit

Permalink
Allow functions as models
Browse files Browse the repository at this point in the history
  • Loading branch information
instanceofmel committed Apr 9, 2024
1 parent dca3a16 commit c894d2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions factory/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright: See the LICENSE file.


import inspect
import collections
import logging
import warnings
Expand Down Expand Up @@ -243,6 +244,7 @@ def _get_counter_reference(self):
if (self.model is not None
and self.base_factory is not None
and self.base_factory._meta.model is not None
and inspect.isclass(self.model)
and issubclass(self.model, self.base_factory._meta.model)):
return self.base_factory._meta.counter_reference
else:
Expand Down

0 comments on commit c894d2c

Please sign in to comment.