Skip to content

Commit

Permalink
fix: Annotations list error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tsshimo committed Sep 18, 2019
1 parent bc35ccd commit fba47ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions automan/api/projects/annotations/annotation_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ def list_annotations(
Q(project_id=project_id),
Q(delete_flag=False),
Q(name__contains=search_keyword))[begin:begin + per_page]
if len(annotations) == 0:
raise ObjectDoesNotExist()

records = []
for annotation in annotations:
Expand Down
10 changes: 5 additions & 5 deletions front/app/dashboard/components/annotation/table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ class AnnotationTable extends React.Component {
);
}
render() {
// if ( this.state.error ) {
// return (
// <div> {this.state.error} </div>
// );
// }
if ( this.state.error ) {
return (
<div> {this.state.error} </div>
);
}

const { classes } = this.props;
let rows = [];
Expand Down

0 comments on commit fba47ce

Please sign in to comment.