Skip to content

Commit 7edbc64

Browse files
authored
Merge pull request #55 from uw-it-aca/pm-Add_repository_timestamp
add RepositoryTimeStamp attribute
2 parents 9f2853a + 14bb729 commit 7edbc64

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

uw_pws/models.py

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class Person(models.Model):
4646
preferred_surname = models.CharField(max_length=250)
4747
pronouns = models.CharField(max_length=128)
4848
whitepages_publish = models.NullBooleanField()
49+
repository_time_stamp = models.DateTimeField()
4950

5051
# Affiliation flags
5152
is_student = models.BooleanField(default=False)
@@ -155,6 +156,7 @@ def json_data(self):
155156
'mailstop': self.mailstop,
156157
'home_department': self.home_department,
157158
'publish_in_emp_directory': self.publish_in_emp_directory,
159+
'repository_time_stamp': self.repository_time_stamp,
158160
'student_number': self.student_number,
159161
'student_system_key': self.student_system_key,
160162
'student_class': self.student_class,
@@ -206,6 +208,7 @@ def from_json(data):
206208
person.preferred_middle_name = data.get("PreferredMiddleName")
207209
person.preferred_surname = data.get("PreferredSurname")
208210
person.pronouns = data.get("Pronouns")
211+
person.repository_time_stamp = data.get("RepositoryTimeStamp")
209212

210213
for affiliation in data.get("EduPersonAffiliations", []):
211214
if affiliation == "student":

uw_pws/tests/test_models.py

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def test_person(self):
3333
"PreferredFirstName": None,
3434
"PreferredSurname": None,
3535
"RegisteredName": "Bill Average Teacher",
36+
"RepositoryTimeStamp": "1/1/2020 1:23:45 AM",
3637
"IsTestEntity": False,
3738
"RegisteredSurname": "Teacher",
3839
"EduPersonAffiliations": [
@@ -91,6 +92,7 @@ def test_person(self):
9192
person.json_data(),
9293
{'uwnetid': 'bill',
9394
'uwregid': 'FBB38FE46A7C11D5A4AE0004AC494FFE',
95+
'repository_time_stamp': '1/1/2020 1:23:45 AM',
9496
'is_test_entity': False,
9597
'first_name': 'Bill Average',
9698
'surname': 'Teacher',

0 commit comments

Comments
 (0)