mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Make sure number of steps is always correct.
This commit is contained in:
@@ -212,7 +212,7 @@ class Account extends Model
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNameAttribute($value): string
|
||||
public function getNameAttribute($value): ?string
|
||||
{
|
||||
if ($this->encrypted) {
|
||||
return Crypt::decrypt($value);
|
||||
|
@@ -173,30 +173,6 @@ class ImportJob extends Model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $steps
|
||||
*/
|
||||
public function setStepsDone(int $steps)
|
||||
{
|
||||
$status = $this->extended_status;
|
||||
$status['done'] = $steps;
|
||||
$this->extended_status = $status;
|
||||
$this->save();
|
||||
Log::debug(sprintf('Set steps done for job "%s" to %d', $this->key, $steps));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $count
|
||||
*/
|
||||
public function setTotalSteps(int $count)
|
||||
{
|
||||
$status = $this->extended_status;
|
||||
$status['steps'] = $count;
|
||||
$this->extended_status = $status;
|
||||
$this->save();
|
||||
Log::debug(sprintf('Set total steps for job "%s" to %d', $this->key, $count));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
|
Reference in New Issue
Block a user