Skip to content

Commit

Permalink
Fix: Replace missing method with function import
Browse files Browse the repository at this point in the history
  • Loading branch information
onefloid authored and MariusWirtz committed Apr 12, 2024
1 parent f2770c6 commit 5006040
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TM1py/Services/AuditLogService.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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))
Expand All @@ -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)
self.configuration.update_static(config)

0 comments on commit 5006040

Please sign in to comment.