Cannot filter on fields latitude and longitude from orm manager #14742
Answered
by
jeremystretch
tux-mania
asked this question in
Help Wanted!
-
Deployment TypeSelf-hosted NetBox Versionv3.6.4 Python Version3.9 Steps to Reproduce
python manage.py nbshell
>>> site = Site.objects.get(id=2833)
>>> site.latitude
>>> Expected BehaviorThe value from latitude field should be displayed. Observed BehaviorNothing is shown, as if value of this field was None. |
Beta Was this translation helpful? Give feedback.
Answered by
jeremystretch
Jan 8, 2024
Replies: 1 comment 1 reply
-
This works fine for me. >>> site = Site.objects.get(pk=2)
>>> site.latitude
Decimal('12.345000') The only reason you would see anything returned accessing the Are you sure you're connected to the same NetBox instance/database as the UI? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
tux-mania
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works fine for me.
The only reason you would see anything returned accessing the
latitude
attribute is that no value is set on the object.Are you sure you're connected to the same NetBox instance/database as the UI?