diff --git a/_modules/apis_core/history/models.html b/_modules/apis_core/history/models.html index ec003ed6f..fdaeae1fc 100644 --- a/_modules/apis_core/history/models.html +++ b/_modules/apis_core/history/models.html @@ -93,6 +93,7 @@

Source code for apis_core.history.models

 from typing import Any
 from apis_core.generic.abc import GenericModel
+from apis_core.apis_metainfo.models import RootObject
 from django.urls import reverse
 from simple_history.models import HistoricalRecords
 from django.core.exceptions import AppRegistryNotReady
@@ -171,6 +172,9 @@ 

Source code for apis_core.history.models

         If only_latest is True, only the latest version of a triple is returned."""
         from apis_core.apis_relations.models import TempTriple
 
+        if not isinstance(self.instance, RootObject):
+            return TempTriple.objects.none()
+
         if history_date is None:
             filter_date = (
                 self.next_record.history_date if self.next_record else datetime.now()
diff --git a/htmlcov/class_index.html b/htmlcov/class_index.html
index fd69660cc..0e699cef9 100644
--- a/htmlcov/class_index.html
+++ b/htmlcov/class_index.html
@@ -55,7 +55,7 @@ 

coverage.py v7.5.3, - created at 2024-06-04 10:12 +0000 + created at 2024-06-04 10:13 +0000

@@ -2265,40 +2265,40 @@

100% - apis_core/history/models.py - APISHistoricalRecords + apis_core/history/models.py + APISHistoricalRecords 10 4 0 60% - apis_core/history/models.py - APISHistoryTableBase - 31 - 31 + apis_core/history/models.py + APISHistoryTableBase + 33 + 33 0 - 0% + 0% - apis_core/history/models.py - APISHistoryTableBase.Meta + apis_core/history/models.py + APISHistoryTableBase.Meta 0 0 0 100% - apis_core/history/models.py - VersionMixin + apis_core/history/models.py + VersionMixin 23 23 0 0% - apis_core/history/models.py - VersionMixin.Meta + apis_core/history/models.py + VersionMixin.Meta 0 0 0 @@ -2307,10 +2307,10 @@

apis_core/history/models.py (no class) - 39 + 40 0 0 - 100% + 100% apis_core/history/serializers.py @@ -2821,10 +2821,10 @@

Total   - 2401 - 1018 + 2404 + 1020 0 - 58% + 58% @@ -2836,7 +2836,7 @@

coverage.py v7.5.3, - created at 2024-06-04 10:12 +0000 + created at 2024-06-04 10:13 +0000

@@ -2705,96 +2705,96 @@

100% - apis_core/history/models.py - APISHistoricalRecords.get_m2m_fields_from_model + apis_core/history/models.py + APISHistoricalRecords.get_m2m_fields_from_model 8 2 0 75% - apis_core/history/models.py - APISHistoricalRecords.get_prev_record + apis_core/history/models.py + APISHistoricalRecords.get_prev_record 2 2 0 0% - apis_core/history/models.py - APISHistoryTableBase.get_triples_for_version - 12 - 12 + apis_core/history/models.py + APISHistoryTableBase.get_triples_for_version + 14 + 14 0 - 0% + 0% - apis_core/history/models.py - APISHistoryTableBase.set_version_tag + apis_core/history/models.py + APISHistoryTableBase.set_version_tag 9 9 0 0% - apis_core/history/models.py - APISHistoryTableBase.get_absolute_url + apis_core/history/models.py + APISHistoryTableBase.get_absolute_url 2 2 0 0% - apis_core/history/models.py - APISHistoryTableBase.get_diff + apis_core/history/models.py + APISHistoryTableBase.get_diff 8 8 0 0% - apis_core/history/models.py - VersionMixin._history_date + apis_core/history/models.py + VersionMixin._history_date 1 1 0 0% - apis_core/history/models.py - VersionMixin._history_date + apis_core/history/models.py + VersionMixin._history_date 2 2 0 0% - apis_core/history/models.py - VersionMixin.get_history_url + apis_core/history/models.py + VersionMixin.get_history_url 2 2 0 0% - apis_core/history/models.py - VersionMixin.get_create_version_url + apis_core/history/models.py + VersionMixin.get_create_version_url 2 2 0 0% - apis_core/history/models.py - VersionMixin.get_history_data + apis_core/history/models.py + VersionMixin.get_history_data 15 15 0 0% - apis_core/history/models.py - VersionMixin.__init__ + apis_core/history/models.py + VersionMixin.__init__ 1 1 0 @@ -2803,10 +2803,10 @@

apis_core/history/models.py (no function) - 39 + 40 0 0 - 100% + 100% apis_core/history/serializers.py @@ -3789,10 +3789,10 @@

Total   - 3219 - 1640 + 3222 + 1642 0 - 49% + 49% @@ -3804,7 +3804,7 @@

coverage.py v7.5.3, - created at 2024-06-04 10:12 +0000 + created at 2024-06-04 10:13 +0000