Skip to content

Commit

Permalink
Make sanitise supplier name method not private
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDoubleK committed Nov 3, 2015
1 parent 0cfb83d commit 7e696f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dmutils/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ def get_agreement_document_path(framework_slug, supplier_id, supplier_name, docu
return '{0}/agreements/{1}/{2}-{1}-{3}'.format(
framework_slug,
supplier_id,
_sanitise_supplier_name(supplier_name),
sanitise_supplier_name(supplier_name),
document_name
)


def _sanitise_supplier_name(supplier_name):
def sanitise_supplier_name(supplier_name):
sanitised_supplier_name = supplier_name.strip().replace(' ', '_').replace('&', 'and')
for bad_char in BAD_SUPPLIER_NAME_CHARACTERS:
sanitised_supplier_name = sanitised_supplier_name.replace(bad_char, '')
Expand Down

0 comments on commit 7e696f1

Please sign in to comment.