Advertisement
Mochinov

Untitled

Mar 13th, 2023
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1.  
  2. All ids gives
  3. {
  4. "id": 119,
  5. "name": "Test",
  6. "levels": [
  7. {
  8. "id": 606,
  9. "name": "level 5"
  10. },
  11. {
  12. "id": 605,
  13. "name": "level 4"
  14. },
  15. {
  16. "id": 604,
  17. "name": "level 3"
  18. },
  19. {
  20. "id": 603,
  21. "name": "level 2"
  22. }
  23. ],
  24. "forecast_level": {
  25. "id": 602,
  26. "name": "fk"
  27. }
  28. }
  29.  
  30.  
  31.  
  32. Result:
  33. Delete element: []
  34. Update element: [{'id': 603, 'name': 'level 2'}, {'id': 604, 'name': 'level 3'}, {'id': 605, 'name': 'level 4'}, {'id': 606, 'name': 'level 5'}]
  35. Create element: []
  36.  
  37. -------------------------------------------------------------------------------------------------------
  38.  
  39. Delete element:
  40.  
  41. {
  42. "id": 119,
  43. "name": "Test",
  44. "levels": [
  45. {
  46. "id": 605,
  47. "name": "level 4"
  48. },
  49. {
  50. "id": 604,
  51. "name": "level 3.1"
  52. },
  53. {
  54. "id": 603,
  55. "name": "level 2"
  56. }
  57. ],
  58. "forecast_level": {
  59. "name": "fk"
  60. }
  61. }
  62.  
  63.  
  64. Result:
  65. Delete element: [{'id': 604, 'name': 'level 3'}, {'id': 606, 'name': 'level 5'}]Update element: [{'id': 603, 'name': 'level 2'}, {'id': 604, 'name': 'level 3.1'}, {'id': 605, 'name': 'level 4'}]
  66. Create element: []
  67.  
  68. -------------------------------------------------------------------------------------------------------
  69.  
  70. {
  71. "id": 119,
  72. "name": "Test",
  73. "levels": [
  74. {
  75. "name": "level 6"
  76. },
  77. {
  78. "name": "level 5"
  79. },
  80. {
  81. "id": 605,
  82. "name": "level 4"
  83. },
  84. {
  85. "id": 604,
  86. "name": "level 3.1"
  87. },
  88. {
  89. "id": 603,
  90. "name": "level 2"
  91. }
  92. ],
  93. "forecast_level": {
  94. "name": "fk"
  95. }
  96. }
  97.  
  98.  
  99. Result:
  100. Delete element: [{'id': 604, 'name': 'level 3'}, {'id': 606, 'name': 'level 5'}]
  101. Update element: [{'id': 603, 'name': 'level 2'}, {'id': 604, 'name': 'level 3.1'}, {'id': 605, 'name': 'level 4'}]
  102. Create element: [{'name': 'level 5'}, {'name': 'level 6'}]
  103.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement