Skip to content

Commit

Permalink
Add message_box field to Student class (#139)
Browse files Browse the repository at this point in the history
* Add message_box field to Student class

* Undo version change
  • Loading branch information
Antoni-Czaplicki authored Apr 9, 2024
1 parent 1ea3444 commit 7e75c9f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 1 addition & 3 deletions vulcan/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ async def _request(
full_url = (
url
if url.startswith("http")
else self._rest_url + url
if self._rest_url
else None
else self._rest_url + url if self._rest_url else None
)

if not full_url:
Expand Down
3 changes: 1 addition & 2 deletions vulcan/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
Lesson,
LuckyNumber,
Message,
MessageBox,
)
from .model import DateTime
from .model import DateTime, MessageBox


class VulcanData:
Expand Down
1 change: 0 additions & 1 deletion vulcan/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
from ._lesson import ChangedLesson, Lesson, LessonChanges, LessonRoom
from ._lucky_number import LuckyNumber
from ._message import Address, Message
from ._messagebox import MessageBox
1 change: 1 addition & 0 deletions vulcan/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from ._attachment import Attachment
from ._datetime import DateTime
from ._messagebox import MessageBox
from ._period import Period
from ._pupil import Gender, Pupil
from ._school import School
Expand Down
2 changes: 1 addition & 1 deletion vulcan/data/_messagebox.py → vulcan/model/_messagebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from related import IntegerField, StringField, immutable

from .._endpoints import DATA_MESSAGEBOX
from ..model import Serializable
from ._serializable import Serializable


@immutable
Expand Down
3 changes: 3 additions & 0 deletions vulcan/model/_student.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from related import ChildField, SequenceField, StringField, immutable

from .._endpoints import STUDENT_LIST
from ._messagebox import MessageBox
from ._period import Period
from ._pupil import Pupil
from ._school import School
Expand All @@ -24,6 +25,7 @@ class Student(Serializable):
(e.g. several school buildings)
:var `~vulcan.model.School` ~.school: info about the school
(a single building of the unit)
:var `~vulcan.model.MessageBox` ~.message_box: the student's message box
:var List[`~vulcan.model.Period`] ~.periods: a list of
the student's school year periods
"""
Expand All @@ -35,6 +37,7 @@ class Student(Serializable):
pupil: Pupil = ChildField(Pupil, key="Pupil")
unit: Unit = ChildField(Unit, key="Unit")
school: School = ChildField(School, key="ConstituentUnit")
message_box: MessageBox = ChildField(MessageBox, key="MessageBox")
periods: List[Period] = SequenceField(Period, key="Periods")

@property
Expand Down

0 comments on commit 7e75c9f

Please sign in to comment.