Merge pull request #124 from bowlercaptain/patch-1
Fix 500 from status_post capitalized visibilities
This commit is contained in:
commit
d98a3546a3
S'han modificat 1 arxius amb 2 adicions i 1 eliminacions
|
@ -929,7 +929,8 @@ class Mastodon:
|
||||||
|
|
||||||
# Validate visibility parameter
|
# Validate visibility parameter
|
||||||
valid_visibilities = ['private', 'public', 'unlisted', 'direct', '']
|
valid_visibilities = ['private', 'public', 'unlisted', 'direct', '']
|
||||||
if params_initial['visibility'].lower() not in valid_visibilities:
|
params_initial['visibility'] = params_initial['visibility'].lower()
|
||||||
|
if params_initial['visibility'] not in valid_visibilities:
|
||||||
raise ValueError('Invalid visibility value! Acceptable '
|
raise ValueError('Invalid visibility value! Acceptable '
|
||||||
'values are %s' % valid_visibilities)
|
'values are %s' % valid_visibilities)
|
||||||
|
|
||||||
|
|
Loading…
Referencia en una nova incidència