Skip to content

Commit a19f11a

Browse files
committed
fix: phase 0 in db
1 parent 9e16678 commit a19f11a

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

cvat-core/src/enums.ts

+1
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ export enum LabelType {
259259
}
260260

261261
export enum Phase {
262+
PHASE0 = 'phase0',
262263
PHASE1A = 'phase1a',
263264
PHASE1B = 'phase1b',
264265
PHASE2 = 'phase2'

cvat-ui/src/components/create-task-page/create-task-content.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { idGenerator } from 'components/labels-editor/common';
3333
const { Option } = Select;
3434

3535
type TabName = 'local' | 'share' | 'remote' | 'cloudStorage';
36-
type Phase = 'phase1a' | 'phase1b' | 'phase2';
36+
type Phase = 'phase0' | 'phase1a' | 'phase1b' | 'phase2';
3737
const core = getCore();
3838

3939
export interface CreateTaskData {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by Django 4.2.1 on 2023-10-27 08:45
2+
3+
import cvat.apps.engine.models
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('engine', '0069_remove_task_phase_job_phase'),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name='job',
16+
name='phase',
17+
field=models.CharField(choices=[('phase0', 'PHASE0'), ('phase1a', 'PHASE1A'), ('phase1b', 'PHASE1B'), ('phase2', 'PHASE2')], default=cvat.apps.engine.models.Phase['PHASE0'], max_length=10),
18+
),
19+
]

cvat/apps/engine/models.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def __str__(self):
155155
return self.value
156156

157157
class Phase(str, Enum):
158+
PHASE0 = 'phase0'
158159
PHASE1A = 'phase1a'
159160
PHASE1B = 'phase1b'
160161
PHASE2 = 'phase2'
@@ -499,7 +500,7 @@ class Job(models.Model):
499500

500501
# added field for mola project
501502
phase = models.CharField(max_length=10, choices=Phase.choices(),
502-
default=Phase.PHASE1A)
503+
default=Phase.PHASE0)
503504

504505
def get_dirname(self):
505506
return os.path.join(settings.JOBS_ROOT, str(self.id))

0 commit comments

Comments
 (0)