You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request headers from some services, e.g. Google Cloud, include a list of IP addresses in the REMOTE_ADDR field. When the log information is saved to the logging table an error occurs as the format of the IP field does not match type inet in the database table. This causes an error and the information is not saved.
I've made a pull request with a proposed fix: #55 #55
Traceback below, with IP addresses blanked out:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
The above exception (invalid input syntax for type inet: "xx.xx.xx.xx, yyy.yyy.yyy.yy"
LINE 1: ...DataView', 'get', 'xx.xx.xx....
^
) was the direct cause of the following exception:
File "/usr/local/lib/python3.9/site-packages/rest_framework_tracking/base_mixins.py", line 83, in finalize_response
self.handle_log()
File "/usr/local/lib/python3.9/site-packages/rest_framework_tracking/mixins.py", line 12, in handle_log
APIRequestLog(**self.log).save()
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 750, in save
self.save_base(using=using, force_insert=force_insert,
...
The text was updated successfully, but these errors were encountered:
Request headers from some services, e.g. Google Cloud, include a list of IP addresses in the REMOTE_ADDR field. When the log information is saved to the logging table an error occurs as the format of the IP field does not match type inet in the database table. This causes an error and the information is not saved.
I've made a pull request with a proposed fix: #55
#55
Traceback below, with IP addresses blanked out:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
The above exception (invalid input syntax for type inet: "xx.xx.xx.xx, yyy.yyy.yyy.yy"
LINE 1: ...DataView', 'get', 'xx.xx.xx....
^
) was the direct cause of the following exception:
File "/usr/local/lib/python3.9/site-packages/rest_framework_tracking/base_mixins.py", line 83, in finalize_response
self.handle_log()
File "/usr/local/lib/python3.9/site-packages/rest_framework_tracking/mixins.py", line 12, in handle_log
APIRequestLog(**self.log).save()
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 750, in save
self.save_base(using=using, force_insert=force_insert,
...
The text was updated successfully, but these errors were encountered: