Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
fanglinfang committed Dec 17, 2022
1 parent de36d78 commit c28d523
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions uw_hrp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,23 +198,16 @@ def __init__(self, *args, **kwargs):
if id_data.get("Type") == "Employee_ID":
self.supervisor_eid = id_data.get("Value")

"""
org_details = data.get("OrganizationDetails")
if org_details and len(org_details) > 0:
org = org_details[0].get("Organization")
if org is not None:
self.org_unit_code = org.get("Name")
"""

if data.get("PositionWorkerType") is not None:
self.pos_type = data["PositionWorkerType"].get("Name")

self.is_primary = data.get("PrimaryPosition")
self.end_date = parse_date(data.get("PositionVacateDate"))
self.start_date = parse_date(data.get("StartDate"))
self.supervisory_org = SupervisoryOrganization(
data=data.get("SupervisoryOrganization"))


class WorkerDetails(models.Model):
worker_wid = models.CharField(max_length=32)
is_active = models.BooleanField(default=False)
Expand Down
4 changes: 2 additions & 2 deletions uw_hrp/tests/test_person.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ def test_get_person_by_regid(self):

def test_person_search(self):
pass
#persons = person_search(changed_since_date="2022-12-12")
#self.assertEqual(len(persons), 0)
# persons = person_search(changed_since_date="2022-12-12")
# self.assertEqual(len(persons), 0)

0 comments on commit c28d523

Please sign in to comment.