mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
remove helper for webhooks
This commit is contained in:
parent
87e85c8081
commit
ce71508d8d
@ -696,18 +696,3 @@ def clean_decimal(number):
|
|||||||
return Decimal(0)
|
return Decimal(0)
|
||||||
|
|
||||||
return clean_number.quantize(Decimal(1)) if clean_number == clean_number.to_integral() else clean_number.normalize()
|
return clean_number.quantize(Decimal(1)) if clean_number == clean_number.to_integral() else clean_number.normalize()
|
||||||
|
|
||||||
|
|
||||||
def inheritors(cls):
|
|
||||||
"""
|
|
||||||
Return all classes that are subclasses from the supplied cls
|
|
||||||
"""
|
|
||||||
subcls = set()
|
|
||||||
work = [cls]
|
|
||||||
while work:
|
|
||||||
parent = work.pop()
|
|
||||||
for child in parent.__subclasses__():
|
|
||||||
if child not in subcls:
|
|
||||||
subcls.add(child)
|
|
||||||
work.append(child)
|
|
||||||
return subcls
|
|
||||||
|
Loading…
Reference in New Issue
Block a user