Проработал режим отладки
This commit is contained in:
@@ -37,20 +37,21 @@ class RedmineAPI(RedmineConfig):
|
||||
if not(not activity.is_tracked and activity.date_end):
|
||||
continue
|
||||
try:
|
||||
resp = requests.post(
|
||||
self.base_url + self.time_entries_url,
|
||||
headers={"X-Redmine-Api-Key": self.token},
|
||||
json={
|
||||
"time_entry": {
|
||||
"issue_id": activity.task_id,
|
||||
"hours": activity.time_spent / (2 if is_beginner else 1),
|
||||
"activity_id": ActivityTypes.DEVELOPMENT,
|
||||
"comments": activity.description,
|
||||
"spent_on": activity.date_start.strftime(self.datetime_format)
|
||||
if not config.is_debug:
|
||||
resp = requests.post(
|
||||
self.base_url + self.time_entries_url,
|
||||
headers={"X-Redmine-Api-Key": self.token},
|
||||
json={
|
||||
"time_entry": {
|
||||
"issue_id": activity.task_id,
|
||||
"hours": activity.time_spent / (2 if is_beginner else 1),
|
||||
"activity_id": ActivityTypes.DEVELOPMENT,
|
||||
"comments": activity.description,
|
||||
"spent_on": activity.date_start.strftime(self.datetime_format)
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
if resp.ok:
|
||||
)
|
||||
if config.is_debug or resp.ok:
|
||||
activity.is_tracked = True
|
||||
tracked.append(activity)
|
||||
logger.debug(activity)
|
||||
|
||||
Reference in New Issue
Block a user