Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #201 from alphagov/fix-field-names
Browse files Browse the repository at this point in the history
Fix Bucket name field name
  • Loading branch information
robyoung committed Dec 19, 2013
2 parents fb56900 + 40d63c2 commit 81d786b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backdrop/core/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class Bucket(object):

def __init__(self, db, config):
self.bucket_name = config.name
self.name = config.name
self.repository = db.get_repository(config.name)
self.auto_id_keys = config.auto_ids
self.config = config
Expand Down
6 changes: 3 additions & 3 deletions backdrop/read/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ def bucket_health():
bucket = Bucket(db, bucket_config)
if not bucket.is_recent_enough():
failing_buckets.append({
'name': bucket.bucket_name,
'name': bucket.name,
'last_updated': bucket.get_last_updated()
})
else:
okay_buckets.append(bucket.bucket_name)
okay_buckets.append(bucket.name)

if len(failing_buckets):
message = _bucket_message(failing_buckets)
Expand Down Expand Up @@ -160,7 +160,7 @@ def fetch(bucket_config):
result_data = bucket.query(Query.parse(request.args)).data()
except InvalidOperationError:
return log_error_and_respond(
bucket.bucket_name, 'invalid collect function',
bucket.name, 'invalid collect function',
400)

response = jsonify(data=result_data)
Expand Down
2 changes: 1 addition & 1 deletion backdrop/write/admin_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def _store_data(bucket_config):
ValidationError) as e:
message = e.message
app.logger.error(message)
return _invalid_upload(message, bucket.bucket_name)
return _invalid_upload(message, bucket.name)

return render_template('upload_ok.html')

Expand Down

0 comments on commit 81d786b

Please sign in to comment.