diff --git a/histories/models.py b/histories/models.py index a64bd1c..7a72ca9 100644 --- a/histories/models.py +++ b/histories/models.py @@ -9,6 +9,7 @@ from math import floor from xml.etree import ElementTree as ET from datetime import datetime from django.db import models +from django.core.exceptions import ValidationError import profiles.models as profiles from crawl import crawl from pinocchio.settings import HISTORY_MIN @@ -239,7 +240,10 @@ def generate_history(user, start_time): timestamp=datetime.fromtimestamp(timestamp), history=history ) - new_line.full_clean() - new_line.save() + try: + new_line.full_clean() + new_line.save() + except ValidationError: + pass return history