Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Start #59

wants to merge 1 commit into from

Conversation

zhoucy16
Copy link

start

# user = auth.authenticate(username=username,password=password)
# auth.login(self.request, user)
# except:
# raise ValidateError("System error!")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释掉的代码没有清理。

if Ticket.objects.filter(student_id = self.user.student_id, activity = activity, status = Ticket.STATUS_USED):
return self.reply_text('您已经抢过该活动的票且使用过')
if activity.remain_tickets == 0:
return self.reply_text('没有多的票了!请自行尝试劝退抢到票的朋友们~')
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改为<0比较保险,避免余票数小于0的意外情况发生时继续出票。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant