@@ -116,18 +116,19 @@ def render_prefs_panel(self, panelid, action=None, **kwargs): # @UnusedVariable
116
116
# Process the parameters.
117
117
profile_form = UserProfileForm (email = self .app .currentuser .email )
118
118
password_form = UserPasswordForm ()
119
- if action == "set_profile_info" :
120
- self ._handle_set_profile_info (action , profile_form )
121
- elif action == "set_password" :
122
- self ._handle_set_password (action , password_form )
123
- elif action == "update_repos" :
124
- self .app .currentuser .refresh_repos (delete = True )
125
- flash (_ ("Repositories successfully updated" ), level = 'success' )
126
- elif action is None :
127
- pass
128
- else :
129
- _logger .warning ("unknown action: %s" , action )
130
- raise cherrypy .NotFound ("Unknown action" )
119
+ if cherrypy .request .method == 'POST' :
120
+ if action == "set_profile_info" :
121
+ self ._handle_set_profile_info (action , profile_form )
122
+ elif action == "set_password" :
123
+ self ._handle_set_password (action , password_form )
124
+ elif action == "update_repos" :
125
+ self .app .currentuser .refresh_repos (delete = True )
126
+ flash (_ ("Repositories successfully updated" ), level = 'success' )
127
+ elif action is None :
128
+ pass
129
+ else :
130
+ _logger .warning ("unknown action: %s" , action )
131
+ raise cherrypy .NotFound ("Unknown action" )
131
132
params = {
132
133
'profile_form' : profile_form ,
133
134
'password_form' : password_form ,
0 commit comments