summaryrefslogtreecommitdiff
blob: f4c64c0e1a6aa6c0a82edfa61d2eb39edb8228e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/db/view/view.cc b/db/view/view.cc
index d0242b3487..1ee3119101 100644
--- a/db/view/view.cc
+++ b/db/view/view.cc
@@ -311,7 +311,7 @@ deletable_row& view_updates::get_view_row(const partition_key& base_key, const c
             if (!cdef.is_computed()) {
                 //FIXME(sarna): this legacy code is here for backward compatibility and should be removed
                 // once "computed_columns feature" is supported by every node
-                if (!service::get_local_storage_service().db().local().find_column_family(_base->id()).get_index_manager().is_index(*_base)) {
+                if (!service::get_local_storage_service().db().local().find_column_family(_base->id()).get_index_manager().is_index(*_view)) {
                     throw std::logic_error(format("Column {} doesn't exist in base and this view is not backing a secondary index", cdef.name_as_text()));
                 }
                 computed_value = token_column_computation().compute_value(*_base, base_key, update);