Fix upload to SoundCloud button remaining disabled after upload failure

This commit is contained in:
Duncan Sommerville 2015-06-23 19:02:28 -04:00
parent 9bce3e6850
commit d48e594dcd
2 changed files with 7 additions and 2 deletions

View file

@ -96,7 +96,12 @@ abstract class ThirdPartyService {
$ref = ThirdPartyTrackReferencesQuery::create()
->filterByDbService(static::$_SERVICE_NAME)
->findOneByDbFileId($fileId); // There shouldn't be duplicates!
return !empty($ref);
if (!empty($ref)) {
$task = CeleryTasksQuery::create()
->findOneByDbTrackReference($ref->getDbId());
return $task->getDbStatus() != CELERY_FAILED_STATUS;
}
return false;
}
/**