#NEWLINE# def insert_into_communities( self , is_member , name , slug ) : #NEWLINE# #INDENT# participant_id = self . id #NEWLINE# self . db . run ( '\n\n            INSERT INTO community_members\n                        (ctime, name, slug, participant, is_member)\n                 VALUES ( COALESCE (( SELECT ctime\n                                        FROM community_members\n                                       WHERE participant=%(participant_id)s\n                                         AND slug=%(slug)s\n                                       LIMIT 1\n                                      ), CURRENT_TIMESTAMP)\n                        , %(name)s, %(slug)s, %(participant_id)s, %(is_member)s\n                         )\n\n        ' , locals ( ) )