From 669c5f5208d0bf095b92ac17d18259e1d937480c Mon Sep 17 00:00:00 2001 From: "j.gohier" Date: Thu, 7 Nov 2024 17:28:21 +0100 Subject: [PATCH] putain de pydantic de Mer.... --- deevirt_schema/api/stats.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deevirt_schema/api/stats.py b/deevirt_schema/api/stats.py index da9510c..d08949b 100644 --- a/deevirt_schema/api/stats.py +++ b/deevirt_schema/api/stats.py @@ -1,4 +1,4 @@ -import datetime +import time, datetime from typing import Optional from pydantic import BaseModel, ConfigDict, Field from ..libvirt.dom.stats import Stats, Memory @@ -16,4 +16,4 @@ class Stats(Stats): class MongoStats(Stats): model_config = ConfigDict(arbitrary_types_allowed=True) - created_at: datetime = Field(default=datetime.datetime.now(datetime.timezone.utc), alias='created_at') \ No newline at end of file + created_at: int = Field(default=time.time(), alias='created_at') \ No newline at end of file diff --git a/setup.py b/setup.py index a23243e..8609553 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup setup( name='deevirt_schema', - version='0.1.15', + version='0.1.16', description='Deevirt Schema', url='https://git.celeonet.fr/Deevirt/deevirt_schema.git', author='Celeonet',