Skip to content

Instantly share code, notes, and snippets.

@bendavis78
Created April 15, 2011 17:32
Show Gist options
  • Save bendavis78/922089 to your computer and use it in GitHub Desktop.
Save bendavis78/922089 to your computer and use it in GitHub Desktop.
diff --git a/leadmachine/admin/sites/listadmin.py b/leadmachine/admin/sites/listadmin.py
index cae72e5..435a403 100644
--- a/leadmachine/admin/sites/listadmin.py
+++ b/leadmachine/admin/sites/listadmin.py
@@ -488,7 +488,8 @@ class SourceListAdmin(LeadMachineModelAdmin):
for f in ['first_name', 'last_name', 'middle_name', 'title', 'suffix', 'external_uid']:
val = getattr(item, f, getattr(contact, f))
if f in ('first_name', 'last_name', 'middle_name'):
- val = val.lower().title()
+ if val in (val.upper(), val.lower()):
+ val = val.lower().title()
setattr(contact, f, val)
contact_custom_fields = dict(custom_field_mapping).get('Contact')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment