diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..2be1dd0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,42 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + + + + +**Describe the bug 问题描述** +A clear and concise description of what the bug is. + +**To Reproduce 复现过程** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Error log 报错日志** + +``` +[Error] Balabalabalabala... +``` + +**Screenshots 截图** + + +If applicable, add screenshots to help explain your problem. + +**Environment 环境** + - Server OS: [e.g. Windows 11 Beta] + - Client OS: [e.g. Android 10] + - Server Version: [e.g. v2.8.1] + - Client Version [e.g. 4.0.256c] + - Others like python version, flask version, some proxy softwares if you used... + +**Additional context 附加内容** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..11fc491 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/q-a.md b/.github/ISSUE_TEMPLATE/q-a.md new file mode 100644 index 0000000..95fb60e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/q-a.md @@ -0,0 +1,14 @@ +--- +name: Q&A +about: Ask a question or wonder something +title: '' +labels: Q&A +assignees: '' + +--- + +**What you want to know 你想知道什么** +Clearly describe your question here. + +**Additional context 附加内容** +Add anything other here. Your abilities or knowledge base, your contact information, some pictures... diff --git a/latest version/core/save.py b/latest version/core/save.py index 8a192ac..ed6ed72 100644 --- a/latest version/core/save.py +++ b/latest version/core/save.py @@ -110,6 +110,8 @@ class SaveData: ''' 从Arcaea客户端给的奇怪字符串中获取存档数据,并进行数据校验 ''' + if not value: + return None if key not in self.__dict__: raise KeyError( 'Property `%s` is not found in the instance of `SaveData` class.' % key) diff --git a/latest version/server/user.py b/latest version/server/user.py index 4904aeb..0c7f1d0 100644 --- a/latest version/server/user.py +++ b/latest version/server/user.py @@ -138,7 +138,7 @@ def cloud_post(user_id): save.set_value( 'story_data', request.form['story_data'], request.form['story_checksum']) save.set_value( - 'finalestate_data', request.form['finalestate_data'], request.form['finalestate_checksum']) + 'finalestate_data', request.form.get('finalestate_data'), request.form.get('finalestate_checksum')) save.update_all(user) return success_return({'user_id': user.user_id})