From 500604051ac73d8efc192933b1ea110b729d02be Mon Sep 17 00:00:00 2001 From: onefloid <33193059+onefloid@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:38:57 +0200 Subject: [PATCH] Fix: Replace missing method with function import --- TM1py/Services/AuditLogService.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TM1py/Services/AuditLogService.py b/TM1py/Services/AuditLogService.py index 37c04799..eaa42044 100644 --- a/TM1py/Services/AuditLogService.py +++ b/TM1py/Services/AuditLogService.py @@ -8,7 +8,7 @@ from TM1py.Services.RestService import RestService from TM1py.Utils import verify_version, deprecated_in_version, odata_track_changes_header, require_data_admin, \ format_url, \ - require_version, require_ops_admin + require_version, require_ops_admin, utc_localize_time from TM1py.Services.ConfigurationService import ConfigurationService @@ -74,13 +74,13 @@ def get_entries(self, user: str = None, object_type: str = None, object_name: st if since: # If since doesn't have tz information, UTC is assumed if not since.tzinfo: - since = self.utc_localize_time(since) + since = utc_localize_time(since) log_filters.append(format_url( "TimeStamp ge {}", since.strftime("%Y-%m-%dT%H:%M:%SZ"))) if until: # If until doesn't have tz information, UTC is assumed if not until.tzinfo: - until = self.utc_localize_time(until) + until = utc_localize_time(until) log_filters.append(format_url( "TimeStamp le {}", until.strftime("%Y-%m-%dT%H:%M:%SZ"))) url += "&$filter={}".format(" and ".join(log_filters)) @@ -93,4 +93,4 @@ def get_entries(self, user: str = None, object_type: str = None, object_name: st @require_ops_admin def activate(self): config = {'Administration': {'AuditLog': {'Enable': True}}} - self.configuration.update_static(config) \ No newline at end of file + self.configuration.update_static(config)