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

Fix Bucket name field name #201

Merged
merged 1 commit into from
Dec 19, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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