- Timestamp:
- 8 Feb 2012, 13:46:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/tools/fix_import_file.py
r7602 r7610 58 58 'semester': 'semester', 59 59 'application_category': 'application_category', 60 'lga': 'lga', 60 61 } 61 62 … … 79 80 'student_created': 'created', 80 81 'admitted': 'admitted', 82 'objection_raised': 'clearance started', 81 83 'clearance_pin_entered': 'clearance started', 82 84 'clearance_requested': 'clearance requested', … … 146 148 return value 147 149 150 @classmethod 151 def lga(self, value): 152 """ Remove apostrophe 153 """ 154 if value == 'akwa_ibom_uru_offong_oruko': 155 return 'akwa_ibom_urue-offong-oruko' 156 try: 157 value = value.replace("'","") 158 value = value.lower() 159 except: 160 return '' 161 return value 162 148 163 149 164 @classmethod … … 167 182 """ 'True'/'False' --> 'married'/'unmarried' 168 183 """ 169 if value == 'True':184 if value in ('True','married'): 170 185 value = 'married' 171 elif value == 'False':186 elif value in ('False','unmarried'): 172 187 value = 'unmarried' 173 188 else: … … 179 194 """ 'True'/'False' --> 'f'/'m' 180 195 """ 181 if value == 'True':196 if value in ('True','f'): 182 197 value = 'f' 183 elif value == 'False':198 elif value in ('False','m'): 184 199 value = 'm' 185 200 else:
Note: See TracChangeset for help on using the changeset viewer.