From c2c9c9df4335ae062aa6a32ddf7d77f2f4a84957 Mon Sep 17 00:00:00 2001 From: 10195501416 <10195501416@stu.ecnu.edu.cn> Date: Thu, 9 Dec 2021 17:58:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E4=B8=ADbook=5Fid=E7=94=9F=E6=88=90=E6=96=B9=E5=BC=8F?= =?UTF-8?q?,=E9=81=BF=E5=85=8Dbook=5Fid=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/access/book.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fe/access/book.py b/fe/access/book.py index faa64bd..284ff5f 100644 --- a/fe/access/book.py +++ b/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]