fix: invalid ISO date format in node usage stats API call
datetime.now(UTC).isoformat() produces +00:00 suffix, appending Z
created invalid +00:00Z format causing RemnaWave API 500 errors.
Use .replace('+00:00', 'Z') instead of concatenation.
This commit is contained in:
@@ -2323,8 +2323,8 @@ class RemnaWaveService:
|
||||
async def get_node_user_usage_by_range(self, node_uuid: str, start_date, end_date) -> list[dict[str, Any]]:
|
||||
try:
|
||||
async with self.get_api_client() as api:
|
||||
start_str = start_date.isoformat() + 'Z'
|
||||
end_str = end_date.isoformat() + 'Z'
|
||||
start_str = start_date.isoformat().replace('+00:00', 'Z')
|
||||
end_str = end_date.isoformat().replace('+00:00', 'Z')
|
||||
|
||||
params = {'start': start_str, 'end': end_str}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user