Skip to content

Commit 5f4c53c

Browse files
committed
Migration 컬럼 추가
1 parent 32adb22 commit 5f4c53c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

session/resources.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88

99
class SessionResource(resources.ModelResource):
10-
def before_save_instance(self, instance: Session, using_transactions, dry_run):
11-
instance.start_at = datetime.datetime.now()
10+
def before_import_row(self, row, row_number=None, **kwargs):
11+
row["room_num"] = int(row["room_num"])
1212

1313
class Meta:
1414
model = Session
15-
fields = ["id", "title", "difficulty", "duration", "language", "category"]
15+
fields = ["id", "title", "difficulty", "duration", "language", "category", "start_at", "room_num"]

0 commit comments

Comments
 (0)