Skip to content

Commit

Permalink
Merge 9168081 into 6cef61b
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Graves committed Jan 14, 2019
2 parents 6cef61b + 9168081 commit 3a1499c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions carbon/app.py
Expand Up @@ -325,9 +325,10 @@ def _add_person(xf, person):
add_child(record, 'field',
group_name(person['DLC_NAME'], person['PERSONNEL_SUBAREA_CODE']),
name='[PrimaryGroupDescriptor]')
add_child(record, 'field',
person['ORIGINAL_HIRE_DATE'].strftime("%Y-%m-%d"),
name='[ArriveDate]')
if person['ORIGINAL_HIRE_DATE'] is not None:
add_child(record, 'field',
person['ORIGINAL_HIRE_DATE'].strftime("%Y-%m-%d"),
name='[ArriveDate]')
add_child(record, 'field',
person['APPOINTMENT_END_DATE'].strftime("%Y-%m-%d"),
name='[LeaveDate]')
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Expand Up @@ -135,7 +135,6 @@ def xml_records(E):
E.field('1', {'name': '[LoginAllowed]'}),
E.field('Nuclear Science Non-faculty',
{'name': '[PrimaryGroupDescriptor]'}),
E.field('2015-01-01', {'name': '[ArriveDate]'}),
E.field('2999-12-31', {'name': '[LeaveDate]'}),
E.field('http://example.com/2', {'name': '[Generic01]'}),
E.field('COAC', {'name': '[Generic02]'}),
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/data.yml
Expand Up @@ -26,7 +26,7 @@ person:
MIDDLE_NAME: Hǫlgabrúðr
LAST_NAME: Hammerson
EMAIL_ADDRESS: thor@example.com
ORIGINAL_HIRE_DATE: !!timestamp 2015-01-01 00:00:00.0
ORIGINAL_HIRE_DATE: null
APPOINTMENT_END_DATE: !!timestamp 2999-12-31 00:00:00.0
JOB_TITLE: Visiting Engineer
PERSONNEL_SUBAREA_CODE: COAC
Expand Down

0 comments on commit 3a1499c

Please sign in to comment.