diff --git a/backdrop/core/bucket.py b/backdrop/core/bucket.py index 51f6aab4..8cb18dc6 100644 --- a/backdrop/core/bucket.py +++ b/backdrop/core/bucket.py @@ -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 diff --git a/backdrop/read/api.py b/backdrop/read/api.py index c244936a..3cb6ce7f 100644 --- a/backdrop/read/api.py +++ b/backdrop/read/api.py @@ -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) @@ -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) diff --git a/backdrop/write/admin_ui.py b/backdrop/write/admin_ui.py index ec9a6524..97eea4bf 100644 --- a/backdrop/write/admin_ui.py +++ b/backdrop/write/admin_ui.py @@ -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')