File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -127,19 +127,24 @@ def delist_post(self, post_id: str) -> bool:
127127 updatePost(input: $input) {
128128 post {
129129 id
130- settings {
130+ preferences {
131131 delisted
132132 }
133133 }
134134 }
135135 }
136136 """
137- post_data = {"id" : post_id , "settings " : {"delisted" : True }}
137+ post_data = {"id" : post_id , "preferences " : {"delisted" : True }}
138138 response = self ._execute_request (mutation , variables = {"input" : post_data })
139139
140140 try :
141- delisted = response ["data" ]["updatePost" ]["post" ]["settings" ]["delisted" ]
142- self .debug_data .append ([datetime .now (ZoneInfo ("UTC" )), f"Delisted post: { post_id } , Delisted: { delisted } " ])
141+ delisted = response ["data" ]["updatePost" ]["post" ]["preferences" ]["delisted" ]
142+ self .debug_data .append (
143+ [
144+ datetime .now (ZoneInfo ("UTC" )).strftime ("%Y-%m-%d %H:%M:%S" ),
145+ f"Delisted post: { post_id } , Delisted: { delisted } " ,
146+ ]
147+ )
143148 return delisted
144149 except KeyError :
145150 self ._log_failure ("Failed to delist post" , post_id , response )
You can’t perform that action at this time.
0 commit comments