瀏覽代碼

修改测试用例中book_id生成方式,避免book_id重复

pull/1/head
李云帆 3 年之前
父節點
當前提交
c2c9c9df43
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      fe/access/book.py

+ 2
- 2
fe/access/book.py 查看文件

@ -3,7 +3,7 @@ import sqlite3 as sqlite
import random
import base64
import simplejson as json
import uuid
class Book:
id: str
@ -58,7 +58,7 @@ class BookDB:
"LIMIT ? OFFSET ?", (size, start))
for row in cursor:
book = Book()
book.id = row[0]
book.id = row[0] + '_' + str(uuid.uuid1())
book.title = row[1]
book.author = row[2]
book.publisher = row[3]

Loading…
取消
儲存