mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Fix mac address filter no longer working
This commit is contained in:
parent
4455717957
commit
92e408f30f
1 changed files with 3 additions and 3 deletions
|
@ -50,8 +50,8 @@ def make_version_filter(key, value):
|
||||||
:param value: str or int, The argument's value
|
:param value: str or int, The argument's value
|
||||||
:returns: A Q filter
|
:returns: A Q filter
|
||||||
"""
|
"""
|
||||||
# The lookup is done in a json string, so the lookup has to be formated
|
# The lookup is done in a json string, so it has to be formated
|
||||||
# based on the value's type
|
# based on the value's type (to add " or not)
|
||||||
if type(value) is str:
|
if type(value) is str:
|
||||||
formatted_value = "\"{}\"".format(value)
|
formatted_value = "\"{}\"".format(value)
|
||||||
else:
|
else:
|
||||||
|
@ -196,7 +196,7 @@ class MachineHistorySearch:
|
||||||
"""
|
"""
|
||||||
return (
|
return (
|
||||||
Version.objects.get_for_model(Interface)
|
Version.objects.get_for_model(Interface)
|
||||||
.filter(make_version_filter("mac_address", mac))
|
.filter(make_version_filter("mac_address", str(mac)))
|
||||||
.order_by("revision__date_created")
|
.order_by("revision__date_created")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue