Skip to content

Commit

Permalink
Fix node.buildings
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Dickinson committed Jun 2, 2024
1 parent 768cdbf commit e8d1854
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/meshapi/models/node.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
from typing import Any
from typing import TYPE_CHECKING, Any

from django.core.validators import MaxValueValidator
from django.db import models

from meshapi.util.network_number import NETWORK_NUMBER_MAX, get_next_available_network_number

if TYPE_CHECKING:
# Gate the import to avoid cycles
from meshapi.models.building import Building


class Node(models.Model):
# This should be added automatically by django-stubs, but for some reason it's not :(
buildings: models.QuerySet["Building"]

class NodeStatus(models.TextChoices):
INACTIVE = "Inactive"
ACTIVE = "Active"
Expand Down

0 comments on commit e8d1854

Please sign in to comment.