Skip to content

Commit 40ba152

Browse files
committed
add more undocumented relations
1 parent 1d61cc3 commit 40ba152

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

services/cleanup/relations.py

+8
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
from django.db.models import Model, Q
66
from django.db.models.query import QuerySet
7+
from shared.django_apps.bundle_analysis.models import CacheConfig
78
from shared.django_apps.codecov_auth.models import Owner, OwnerProfile
89
from shared.django_apps.core.models import Commit, Pull, Repository
910
from shared.django_apps.reports.models import DailyTestRollup, TestInstance
11+
from shared.django_apps.user_measurements.models import UserMeasurement
1012

1113
# Relations referencing 0 through field 1 of model 2:
1214
IGNORE_RELATIONS: set[tuple[type[Model], str, type[Model]]] = {
@@ -22,6 +24,12 @@
2224
UNDOCUMENTED_RELATIONS: set[tuple[type[Model], str, type[Model]]] = {
2325
(Repository, "repoid", TestInstance),
2426
(Repository, "repoid", DailyTestRollup),
27+
(Commit, "commit_id", UserMeasurement),
28+
(Owner, "owner_id", UserMeasurement),
29+
(Repository, "repo_id", UserMeasurement),
30+
(Repository, "repo_id", CacheConfig),
31+
# TODO: `UserMeasurement` also has `upload_id`, should we register that as well?
32+
# TODO: should we also include `SimpleMetric` here?
2533
}
2634

2735

0 commit comments

Comments
 (0)