Skip to content

Commit a15cebb

Browse files
author
fredkingham
committed
Fixes merge conflicts in doc/mkdocs.yml
2 parents 491ae14 + b83ba20 commit a15cebb

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed

changelog.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
### 0.22.1 (Minor Release)
2+
3+
#### Exclude many to one relationships from the advanced search
4+
5+
Many to one fields are no longer visible in the advanced search screen.
6+
7+
18
### 0.22.0 (Major Release)
29

310
#### Advanced search changes
@@ -9,11 +16,11 @@ A list of functions attached to the application object that
916
enable the application to add, remove or alter files in an
1017
advanced search extract.
1118

12-
1319
#### Include ID in the extract
1420

1521
The model ID will no longer be excluded from its csv extract. If present, id will appear first, then patient id, then episode id.
1622

23+
1724
### 0.21.0 (Major Release)
1825

1926
#### Celery upgrade and Django Celery library change.

doc/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ dev_addr: 0.0.0.0:8965
121121
include_next_prev: false
122122

123123
extra:
124-
version: v0.22.0
124+
version: v0.22.1
125125

126126
markdown_extensions:
127127
- fenced_code

opal/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""
22
Declare our current version string
33
"""
4-
__version__ = '0.22.0'
4+
__version__ = '0.22.1'

opal/core/search/static/js/search/controllers/extract.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,8 @@ angular.module('opal.controllers').controller(
8585

8686
return criteria;
8787
};
88-
8988
$scope.searchableFields = function(columnName){
9089
var column = $scope.findColumn(columnName);
91-
// TODO - don't hard-code this
9290
if(column){
9391
return _.map(
9492
_.reject(
@@ -97,8 +95,9 @@ angular.module('opal.controllers').controller(
9795
if(_.contains(NOT_ADVANCED_SEARCHABLE, c.name)){
9896
return true;
9997
}
100-
return c.type == 'token' || c.type == 'list';
98+
return c.type == 'token' || c.type == 'list' || c.type == "many_to_o";;
10199
}),
100+
102101
function(c){ return c; }
103102
).sort();
104103
}
@@ -144,6 +143,9 @@ angular.module('opal.controllers').controller(
144143
};
145144

146145
$scope.getChoices = function(column, field){
146+
if(!field){
147+
return []
148+
}
147149
var modelField = $scope.findField(column, field);
148150

149151
if(modelField.lookup_list && modelField.lookup_list.length){

opal/core/search/static/js/test/extract.controller.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ describe('ExtractCtrl', function(){
102102
"name":"consistency_token",
103103
"type":"token"
104104
},
105+
{
106+
"title":"A Many To One",
107+
"lookup_list":null,
108+
"name":"a many to one",
109+
"type":"many_to_o"
110+
},
105111
{
106112
"title":"Created",
107113
"lookup_list":null,
@@ -375,6 +381,11 @@ describe('ExtractCtrl', function(){
375381
var result = $scope.getChoices("some", "field");
376382
expect(result).toEqual([1, 2, 3]);
377383
});
384+
385+
it('should error if there is no field', function(){
386+
var result = $scope.getChoices("some", null);
387+
expect(result).toEqual([]);
388+
});
378389
});
379390

380391
describe('refresh', function(){

0 commit comments

Comments
 (0)