TACC / Core-CMS-Custom

Customized Core CMS code and builds
5 stars 0 forks source link

Check for missing values on contacts table #258

Closed edmondsgarrett closed 6 months ago

edmondsgarrett commented 6 months ago

Overview

Checks for empty values on registration contacts table …

Related

… ## Changes - Checks if columns are defined for contacts table, otherwise defaults them to None … ## Testing 1. In apps/admin_regis_table/views.py, replace lines 71-73 in `apps/admin_regis_table/views.py` with the following:
Snippet registrations_content = [ ( 1, #registration_id '2013-01-23 10:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end True, #submitting_for_self 'received', #registration_status 'carrier', #org_type 'BRule Insurance Company', #business_name '7440 Woodland Drive', #mail_address 'Indianpolis', #city 'IN', #state '46278 ' #zip ), ( 2, #registration_id '2023-01-23 10:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end False, #submitting_for_self 'processing', #registration_status 'pbm', #org_type 'Clay Tenant Once Company', #business_name '440 Wood and Drive', #mail_address 'Indianapolis', #city 'NY', #state '24444 ' #zip ), ( 3, #registration_id '2023-01-23 12:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end True, #submitting_for_self 'complete', #registration_status 'carrier', #org_type 'Magentation Insurance Company', #business_name '742 Oddland Drive', #mail_address 'Indipolis', #city 'MI', #state '62784 ' #zip ), ( 1, #registration_id '2023-05-03 10:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end True, #submitting_for_self 'received', #registration_status 'tpa_aso', #org_type 'Golden Rule Insurance Co', #business_name '7440 Woodland Drive', #mail_address 'Indianpolis', #city 'IN', #state '46278 ' #zip ), ( 2, #registration_id '2022-01-23 10:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end False, #submitting_for_self 'processing', #registration_status 'pbm', #org_type 'CTenant Insurance Company', #business_name '440 Wood and Drive', #mail_address 'Indianapolis', #city 'NY', #state '24444 ' #zip ), ( 3, #registration_id '2023-01-13 10:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end True, #submitting_for_self 'complete', #registration_status 'tpa_aso', #org_type 'Magenta Conditn Insurance Company', #business_name '742 Oddland Drive', #mail_address 'Indipolis', #city 'MI', #state '62784 ' #zip ), ( 1, #registration_id '2003-03-03 10:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end True, #submitting_for_self 'received', #registration_status 'carrier', #org_type 'Goden Rule Insurance Company', #business_name '7440 Woodland Drive', #mail_address 'Indianpolis', #city 'IN', #state '46278 ' #zip ), ( 2, #registration_id '2021-04-23 10:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end False, #submitting_for_self 'processing', #registration_status 'pbm', #org_type 'Clay enant Insurance Company', #business_name '440 Wood and Drive', #mail_address 'Indianapolis', #city 'NY', #state '24444 ' #zip ), ( 3, #registration_id '2023-01-23 11:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end True, #submitting_for_self 'complete', #registration_status 'carrier', #org_type 'Magenta Condition Insurance Company', #business_name '742 Oddland Drive', #mail_address 'Indipolis', #city 'MI', #state '62784 ' #zip ), ( 1, #registration_id '2009-11-23 10:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end True, #submitting_for_self 'received', #registration_status 'carrier', #org_type 'Golden Rule Insurance Company', #business_name '7440 Woodland Drive', #mail_address 'Indianpolis', #city 'IN', #state '46278 ' #zip ), ( 2, #registration_id '2002-05-27 10:49:36.880753', #posted_date 12023, #applicable_period_start 122023, #applicable_period_end False, #submitting_for_self 'processing', #registration_status 'pbm', #org_type 'Clay Tenant Insurance Company', #business_name '440 Wood and Drive', #mail_address 'Indianapolis', #city 'NY', #state '24444 ' #zip ), ( 3, #registration_id None, #posted_date 12023, #applicable_period_start 122023, #applicable_period_end True, #submitting_for_self 'complete', #registration_status 'tpa_aso', #org_type 'Magenta Condition Insurance Company', #business_name '742 Oddland Drive', #mail_address 'Indipolis', #city 'MI', #state '62784 ' #zip ) ] registrations_entities = [ ( 5, 1, 5, 46, 11111, None, 5, 'Garretts Test Business 2', '11-0001111', True, True, True, True, False ), ( 5, 2, 50000, 47, 11010, 21101, 1, 'A Second Test Entity', '00-0000000', True, False, False, True, False ) ] registrations_contacts = [ ( 52, 1, False, 'Test Role', 'Garrett Test Tester', '', 'notarealemail@emailplace.com' ), ( 53, 1, False, '', '', '15555555555', 'testemail@testemail.net' ), ( 54, 2, True, 'A 3rd and final test role', 'Test 3rd Role Name Garrett', '0000000000', 'email@gmail.com' ) ]
2. Go to http://localhost:8000/administration/list-registration-requests/ and confirm the page loads and all records show on table and in view/edit modals. Any missing contact info should instead display 'None' ## UI …