Skip to content

Commit

Permalink
Ensure historical subdivision is always added for FMIS entry (#24)
Browse files Browse the repository at this point in the history
Also:
* fix formatting error in kmb_massload

Task: [T167350](https://phabricator.wikimedia.org/T167350)
  • Loading branch information
lokal-profil committed Jun 8, 2017
1 parent 838dbfd commit 7c367b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion KMB/kmb_massload.py
Expand Up @@ -302,7 +302,7 @@ def kmb_wrapper(idno, log):
try:
f = urllib2.urlopen(url)
except urllib2.HTTPError as e:
error_message = '{1}: {2}'.format(e, url)
error_message = '{0}: {1}'.format(e, url)
A['problem'].append(error_message)
log.write('{0} -- {1}'.format(idno, error_message))
else:
Expand Down
7 changes: 5 additions & 2 deletions KMB/make_KMB_info.py
Expand Up @@ -673,15 +673,18 @@ def make_default_fmis_category(self, cache):
muni_cat = self.municipal_subcategory(
'Archaeological monuments in {}', cache)

# add the modern subdivision
if muni_cat:
self.needs_place_cat = False
self.content_cats.add(muni_cat)
else:
self.content_cats.add(
'Archaeological monuments in {}'.format(self.landskap))
self.content_cats.add(
'Archaeological monuments in {} County'.format(self.lan))

# add the historical subdivision
self.content_cats.add(
'Archaeological monuments in {}'.format(self.landskap))

def make_default_bbr_category(self, cache):
"""
Set BBR default categories based on municipality.
Expand Down

0 comments on commit 7c367b7

Please sign in to comment.