(
session,
input,
project_string_id,
do_add_to_session = True)
| 76 | |
| 77 | |
| 78 | def __userscript_new( |
| 79 | session, |
| 80 | input, |
| 81 | project_string_id, |
| 82 | do_add_to_session = True): |
| 83 | |
| 84 | userscript = UserScript.new( |
| 85 | member = get_member(session), |
| 86 | project = Project.get(session, project_string_id), |
| 87 | client_created_time = input['client_created_time'], |
| 88 | client_creation_ref_id = input['client_creation_ref_id'], |
| 89 | name = input['name'], |
| 90 | code = input['code'], |
| 91 | external_src_list = input['external_src_list'], |
| 92 | language = input['language'] |
| 93 | ) |
| 94 | |
| 95 | if do_add_to_session is True: |
| 96 | session.add(userscript) |
| 97 | session.flush() # For ID |
| 98 | |
| 99 | return userscript |
| 100 | |
| 101 | |
| 102 |
no test coverage detected