Debugging db migration issues

This commit is contained in:
Collin R
2021-02-22 00:26:34 -08:00
parent 284fff7e36
commit 4305e3f619
4 changed files with 125 additions and 70 deletions

View File

@@ -119,7 +119,7 @@ class Config:
obj['levels'].append({
'name': level.name,
'points': level.points,
'flair_template_id': level.flair_template_id,
'flair_template_id': level.flair_template_id
})
obj['tags'] = ','.join(obj['tags'])
@@ -142,10 +142,8 @@ def interactive_config(dest):
print('\n' + ('#' * 80) + '\nCONFIGURING THE BOT\n' + ('#' * 80) + '\n')
print('Type a value for each field, then press enter.')
print('\nIf a field is specified as optional, then you can skip it by just '
'pressing enter.')
print("\nIt is recommended that you skip any fields that you aren't sure "
'about')
print('\nIf a field is specified as optional, then you can skip it by just pressing enter.')
print("\nIt is recommended that you skip any fields that you aren't sure about")
print('\n*** Core Configuration ***\n')
configvals['core']['subreddit'] = input('name of subreddit to monitor? ')
@@ -154,8 +152,8 @@ def interactive_config(dest):
configvals['filepaths']['log'] = input('log filepath? (optional) ')
print('\n*** Website Links ***\n')
print('These values should only be provided if you have valid URLs for '
'websites that provide these services for your subreddit.\n')
print('These values should only be provided if you have valid URLs for websites that provide '
'these services for your subreddit.\n')
configvals['links']['feedback'] = input('feedback webpage URL? (optional) ')
configvals['links']['scoreboard'] = input('scoreboard webpage URL? (optional) ')
@@ -166,8 +164,8 @@ def interactive_config(dest):
configvals['credentials']['password'] = input('bot password? ')
print('\n*** Flair Levels ***\n')
print('These fields will determine the different levels that your '
'subreddit users can achieve by earning points.')
print('These fields will determine the different levels that your subreddit users can achieve '
'by earning points.')
print('\nFor each level, you should provide...')
print("\t- Level name: the text that appears in the user's flair")
print('\t- Level points: the number of points needed to reach the level')
@@ -175,12 +173,10 @@ def interactive_config(dest):
print('\t subreddit to be used for this level flair')
print('\nThese may be provided in any order; the bot will sort them later.')
print('\nDo not provide more than one level with the same number of points.')
print('\nNote that at the moment, providing a level points value of zero '
'will not set a default flair, because users must solve at least one '
'issue before the bot will keep track of their points and set their '
'flair for the first time.')
print('\nFor any more questions, please refer to the README on the Github '
'page.')
print('\nNote that at the moment, providing a level points value of zero will not set a '
'default flair, because users must solve at least one issue before the bot will keep '
'track of their points and set their flair for the first time.')
print('\nFor any more questions, please refer to the README on the Github page.')
response = 'y'
while response.lower().startswith('y'):