Skip to content

Commit

Permalink
Realizando join de campos de endereço
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobatalha committed Sep 8, 2014
1 parent 7b6660a commit 3f20cb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions delorean/domain.py
Expand Up @@ -415,25 +415,25 @@ def get_data(self, obj):

joined_editor_address = []

if 'editor_address' in obj and obj['editor_address'] != '':
if 'editor_address' in obj and obj['editor_address']:
joined_editor_address.append(obj['editor_address'])

if 'editor_address_city' in obj and obj['editor_address_city'] != '':
if 'editor_address_city' in obj and obj['editor_address_city']:
joined_editor_address.append(obj['editor_address_city'])

if 'editor_address_state' in obj and obj['editor_address_state'] != '':
if 'editor_address_state' in obj and obj['editor_address_state']:
joined_editor_address.append(obj['editor_address_state'])

if 'editor_address_country' in obj and obj['editor_address_country'] != '':
if 'editor_address_country' in obj and obj['editor_address_country']:
joined_editor_address.append(obj['editor_address_country'])

if 'editor_address_zip' in obj and obj['editor_address_zip'] != '':
if 'editor_address_zip' in obj and obj['editor_address_zip']:
joined_editor_address.append(obj['editor_address_zip'])

if 'editor_phone1' in obj and obj['editor_phone1'] != '':
if 'editor_phone1' in obj and obj['editor_phone1']:
joined_editor_address.append(obj['editor_phone1'])

if 'editor_phone2' in obj and obj['editor_phone2'] != '':
if 'editor_phone2' in obj and obj['editor_phone2']:
joined_editor_address.append(obj['editor_phone2'])


Expand Down
2 changes: 1 addition & 1 deletion delorean/templates/title_db_entry.txt
Expand Up @@ -43,7 +43,7 @@
% endif
##
% if editor_address is not UNDEFINED and editor_address:
!v063!${editor_address}
!v063!${editor_address_joined}
% endif
##
% if editor_email is not UNDEFINED and editor_email:
Expand Down

0 comments on commit 3f20cb6

Please sign in to comment.