我正在尝试创建(类似于)发票号码生成器。但是,由于开办企业时发票可能为零或更多,您如何知道实体是否存在?
query = "SELECT loanNumber FROM Loans ORDER BY loanNumber DESC LIMIT 1"
loanNumbers = db.GqlQuery(query)
result = loanNumbers.get()
# for loanNumber in loanNumbers:
if loanNumbers is None:
print "Print the first number"
else:
print "Print the next number"
错误
KindError: No implementation for kind 'Loans'