Skip to content

Commit

Permalink
Changes is not more requirements item
Browse files Browse the repository at this point in the history
  • Loading branch information
dougppaz committed Oct 22, 2018
1 parent a6fd550 commit 8733f80
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions bothub/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,6 @@ def requirements_to_train(self):

r = []

if not self.added.exists() and \
not self.translated_added.exists() and \
not self.deleted.exists():
r.append(_('There was no change in this bot version. No ' +
'examples or translations for {} have been added or ' +
'removed.').format(
languages.VERBOSE_LANGUAGES.get(self.language)))

intents = self.examples.values_list('intent', flat=True)

if '' in intents:
Expand Down Expand Up @@ -483,6 +475,12 @@ def ready_for_train(self):
return True
if previous_update.failed_at:
return True

if not self.added.exists() and \
not self.translated_added.exists() and \
not self.deleted.exists():
return False

return len(self.requirements_to_train) is 0

@property
Expand Down

0 comments on commit 8733f80

Please sign in to comment.