Skip to content

Commit

Permalink
fix dev (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
mainlyIt authored Oct 21, 2024
1 parent 50de193 commit fd8343c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vespadb/observations/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging
import re
from datetime import UTC, datetime
from datetime import UTC, datetime, date
from typing import TYPE_CHECKING, Any

from django.conf import settings
Expand Down Expand Up @@ -226,9 +226,9 @@ def to_representation(self, instance: Observation) -> dict[str, Any]: # noqa: C

data: dict[str, Any] = super().to_representation(instance)
observation_datetime = data.get('observation_datetime')
if isinstance(observation_datetime, datetime.date) and not isinstance(observation_datetime, datetime):
if isinstance(observation_datetime, date) and not isinstance(observation_datetime, datetime):
data['observation_datetime'] = datetime.combine(observation_datetime, datetime.min.time())

data.pop("wn_admin_notes", None)
datetime_fields = [
"created_datetime",
Expand Down

0 comments on commit fd8343c

Please sign in to comment.